From eb84bb298d2b95aec7b2ae12cbf25ac64f25379a Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Sun, 6 Nov 2022 15:12:42 -0500 Subject: move to self host --- .../Assets/_PoiyomiShaders/Examples.meta | 8 + .../Examples/M_AudioLinkDecalRotation.mat | 1708 ++ .../Examples/M_AudioLinkDecalRotation.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/M_Crystal.mat | 2646 ++ .../_PoiyomiShaders/Examples/M_Crystal.mat.meta | 8 + .../_PoiyomiShaders/Examples/M_Iridescence.mat | 1697 ++ .../Examples/M_Iridescence.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/M_Path 1.mat | 1711 ++ .../_PoiyomiShaders/Examples/M_Path 1.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/M_Path.mat | 1711 ++ .../_PoiyomiShaders/Examples/M_Path.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/M_Slime.mat | 2646 ++ .../_PoiyomiShaders/Examples/M_Slime.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/Stencil.meta | 8 + .../Examples/Stencil/DoubleSphere.fbx | Bin 0 -> 57964 bytes .../Examples/Stencil/DoubleSphere.fbx.meta | 108 + .../_PoiyomiShaders/Examples/Stencil/inside.mat | 2093 ++ .../Examples/Stencil/inside.mat.meta | 8 + .../_PoiyomiShaders/Examples/Stencil/outside.mat | 2096 ++ .../Examples/Stencil/outside.mat.meta | 8 + .../Assets/_PoiyomiShaders/Examples/ring.fbx | Bin 0 -> 27392 bytes .../Assets/_PoiyomiShaders/Examples/ring.fbx.meta | 97 + .../Assets/_PoiyomiShaders/ModularShader.meta | 8 + .../ModularShader/AudioLinkNotes.cginc | 13 + .../ModularShader/AudioLinkNotes.cginc.meta | 9 + .../_PoiyomiShaders/ModularShader/Editor.meta | 8 + .../ModularShader/Editor/Poi_FeatureModules.meta | 8 + .../Editor/Poi_FeatureModules/AL_Modules.meta | 8 + .../AL_Modules/Poi_ALDecals.meta | 8 + .../AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset | 73 + .../Poi_ALDecals/VRLM_PoiALDecals.asset.meta | 8 + .../VRLT_PoiALDecals.poiTemplateCollection | 235 + .../VRLT_PoiALDecals.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/EmissFuncs.cginc | 35 + .../Poi_FeatureModules/EmissFuncs.cginc.meta | 8 + .../Poi_FeatureModules/Mochie_PostProcess.meta | 8 + .../VRLM_MochiePostProcess.asset | 60 + .../VRLM_MochiePostProcess.asset.meta | 8 + .../VRLT_MochiePostProcess.poiTemplatecollection | 127 + ...LT_MochiePostProcess.poiTemplatecollection.meta | 10 + .../Poi_FeatureModules/Poi_AlphaOptions.meta | 8 + .../Poi_AlphaOptions/VRLM_AlphaOptions.asset | 98 + .../Poi_AlphaOptions/VRLM_AlphaOptions.asset.meta | 8 + .../VRLT_PoiAlphaOptions.poiTemplateCollection | 208 + ...VRLT_PoiAlphaOptions.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_AudioLink.meta | 8 + .../Poi_AudioLink/VRLM_PoiAudioLink.asset | 81 + .../Poi_AudioLink/VRLM_PoiAudioLink.asset.meta | 8 + .../VRLT_PoiAudioLink.poiTemplateCollection | 390 + .../VRLT_PoiAudioLink.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_BackFace.meta | 8 + .../Poi_BackFace/VRLM_PoiBackface.asset | 72 + .../Poi_BackFace/VRLM_PoiBackface.asset.meta | 8 + .../VRLT_PoiBackface.poiTemplateCollection | 94 + .../VRLT_PoiBackface.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_BasicStencil.meta | 8 + .../Poi_BasicStencil/VRLM_PoiStencil.asset | 47 + .../Poi_BasicStencil/VRLM_PoiStencil.asset.meta | 8 + .../VRLTC_PoiStencil.poiTemplateCollection | 23 + .../VRLTC_PoiStencil.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_ClearCoat.meta | 8 + .../Poi_ClearCoat/VRLM_PoiClearCoat.asset | 69 + .../Poi_ClearCoat/VRLM_PoiClearCoat.asset.meta | 8 + .../VRLT_PoiClearCoat.poiTemplateCollection | 149 + .../VRLT_PoiClearCoat.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Cubemap.meta | 8 + .../Poi_Cubemap/VRLM_PoiCubemap.asset | 66 + .../Poi_Cubemap/VRLM_PoiCubemap.asset.meta | 8 + .../VRLT_PoiCubemap.poiTemplateCollection | 125 + .../VRLT_PoiCubemap.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Decals.meta | 8 + .../Poi_Decals/VRLM_PoiDecals.asset | 69 + .../Poi_Decals/VRLM_PoiDecals.asset.meta | 8 + .../VRLT_PoiDecals.poiTemplateCollection | 582 + .../VRLT_PoiDecals.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_DepthFX.meta | 8 + .../Poi_DepthFX/VRLM_PoiDepthFX.asset | 75 + .../Poi_DepthFX/VRLM_PoiDepthFX.asset.meta | 8 + .../VRLT_PoiDepthFX.poiTemplateCollection | 167 + .../VRLT_PoiDepthFX.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Details.meta | 8 + .../Poi_Details/VRLM_PoiDetails.asset | 75 + .../Poi_Details/VRLM_PoiDetails.asset.meta | 8 + .../VRLT_PoiDetails.poiTemplateCollection | 95 + .../VRLT_PoiDetails.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Dissolve.meta | 8 + .../Poi_Dissolve/VRLM_PoiDissolve.asset | 75 + .../Poi_Dissolve/VRLM_PoiDissolve.asset.meta | 8 + .../VRLT_PoiDissolve.poiTemplateCollection | 352 + .../VRLT_PoiDissolve.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Emission.meta | 8 + .../Poi_Emission/VRLM_PoiEmission.asset | 63 + .../Poi_Emission/VRLM_PoiEmission.asset.meta | 8 + .../VRLTC_PoiEmission.poiTemplateCollection | 907 + .../VRLTC_PoiEmission.poiTemplateCollection.meta | 10 + .../Poi_EnvironemntalRimLighting.meta | 8 + .../VRLM_PoiEnvironmentalRimLighting.asset | 66 + .../VRLM_PoiEnvironmentalRimLighting.asset.meta | 8 + ...iEnvironmentalRimLighting.poiTemplateCollection | 76 + ...ronmentalRimLighting.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_FlipBook.meta | 8 + .../Poi_FlipBook/VRLM_PoiFlipBook.asset | 75 + .../Poi_FlipBook/VRLM_PoiFlipBook.asset.meta | 8 + .../VRLT_PoiFlipBook.poiTemplateCollection | 234 + .../VRLT_PoiFlipBook.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Glitter.meta | 8 + .../Poi_Glitter/VRLM_PoiGlitter.asset | 69 + .../Poi_Glitter/VRLM_PoiGlitter.asset.meta | 8 + .../VRLT_PoiGlitter.poiTemplateCollection | 348 + .../VRLT_PoiGlitter.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_GlobalThemes.meta | 8 + .../Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset | 66 + .../VRLM_PoiGlobalThemes.asset.meta | 8 + .../VRLT_PoiGlobalThemes.poiTemplateCollection | 26 + ...VRLT_PoiGlobalThemes.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_GrabPassBlending.meta | 8 + .../VRLM_PoiGrabPassBlending.asset | 66 + .../VRLM_PoiGrabPassBlending.asset.meta | 8 + .../VRLT_PoiGrabPassBlending.poiTemplateCollection | 184 + ..._PoiGrabPassBlending.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Iridescence.meta | 8 + .../Poi_Iridescence/VRLM_PoiIridescence.asset | 66 + .../Poi_Iridescence/VRLM_PoiIridescence.asset.meta | 8 + .../VRLT_PoiIridescence.poiTemplateCollection | 129 + .../VRLT_PoiIridescence.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_LightData.meta | 8 + .../Poi_LightData/VRLM_PoiFeatureLightData.asset | 61 + .../VRLM_PoiFeatureLightData.asset.meta | 8 + .../VRLTC_PoiLightData.poiTemplateCollection | 478 + .../VRLTC_PoiLightData.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Main.meta | 8 + .../Poi_Main/VRLM_PoiFeatureMain.asset | 69 + .../Poi_Main/VRLM_PoiFeatureMain.asset.meta | 8 + .../Poi_Main/VRLTC_PoiMain.poiTemplateCollection | 149 + .../VRLTC_PoiMain.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Matcap.meta | 8 + .../Poi_Matcap/VRLM_PoiMatcap.asset | 66 + .../Poi_Matcap/VRLM_PoiMatcap.asset.meta | 8 + .../VRLT_PoiMatcap.poiTemplateCollection | 363 + .../VRLT_PoiMatcap.poiTemplateCollection.meta | 10 + .../Poi_MetallicsAndSpecular.meta | 8 + .../VRLM_PoiMetallicsAndSpecular.asset | 66 + .../VRLM_PoiMetallicsAndSpecular.asset.meta | 8 + ...C_PoiMetallicsAndSpecular.poiTemplateCollection | 265 + ...MetallicsAndSpecular.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Mirror.meta | 8 + .../Poi_Mirror/VRLM_PoiMirror.asset | 75 + .../Poi_Mirror/VRLM_PoiMirror.asset.meta | 8 + .../VRLT_PoiMirror.poiTemplateCollection | 54 + .../VRLT_PoiMirror.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_OutlineOptions.meta | 8 + .../Poi_OutlineOptions/VRLM_PoiOutline.asset | 75 + .../Poi_OutlineOptions/VRLM_PoiOutline.asset.meta | 8 + .../VRLT_PoiOutline.poiTemplateCollection | 182 + .../VRLT_PoiOutline.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_PPAnimations.meta | 8 + .../Poi_PPAnimations/VRLM_PoiPPAnimations.asset | 58 + .../VRLM_PoiPPAnimations.asset.meta | 8 + .../VRLT_PoiPPAnimations.poiTemplateCollection | 28 + ...VRLT_PoiPPAnimations.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Parallax.meta | 8 + .../Poi_Parallax/VRLM_PoiParallax.asset | 60 + .../Poi_Parallax/VRLM_PoiParallax.asset.meta | 8 + .../VRLT_PoiParallax.poiTemplateCollection | 238 + .../VRLT_PoiParallax.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Pathing.meta | 8 + .../Poi_Pathing/VRLM_PoiPathing.asset | 69 + .../Poi_Pathing/VRLM_PoiPathing.asset.meta | 8 + .../VRLT_PoiPathing.poiTemplateCollection | 230 + .../VRLT_PoiPathing.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_RenderingOptions.meta | 8 + .../VRLM_PoiRenderingOptions.asset | 48 + .../VRLM_PoiRenderingOptions.asset.meta | 8 + ...VRLTC_PoiRenderingOptions.poiTemplateCollection | 22 + ..._PoiRenderingOptions.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_RgbaMasking.meta | 8 + .../Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset | 75 + .../Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset.meta | 8 + .../VRLT_PoiRgbaMasking.poiTemplateCollection | 287 + .../VRLT_PoiRgbaMasking.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_RimLighting.meta | 8 + .../Poi_RimLighting/VRLM_PoiRimLighting.asset | 69 + .../Poi_RimLighting/VRLM_PoiRimLighting.asset.meta | 8 + .../VRLT_PoiRimLighting.poiTemplateCollection | 144 + .../VRLT_PoiRimLighting.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_Shading.meta | 8 + .../Poi_Shading/VRLM_PoiShading.asset | 104 + .../Poi_Shading/VRLM_PoiShading.asset.meta | 8 + .../VRLTC_PoiShading.poiTemplateCollection | 873 + .../VRLTC_PoiShading.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_StylizedSpecular.meta | 8 + .../VRLM_PoiStylizedSpecular.asset | 66 + .../VRLM_PoiStylizedSpecular.asset.meta | 8 + .../VRLT_PoiStylizedSpecular.poiTemplateCollection | 149 + ..._PoiStylizedSpecular.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/Poi_UVModules.meta | 8 + .../Poi_UVModules/VRLM_PoiUVModifiers.asset | 69 + .../Poi_UVModules/VRLM_PoiUVModifiers.asset.meta | 8 + .../VRLTC_PoiUVModifiers.poiTemplateCollection | 142 + ...VRLTC_PoiUVModifiers.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_VertexColors.meta | 8 + .../Poi_VertexColors/VRLM_PoiVertexColors.asset | 69 + .../VRLM_PoiVertexColors.asset.meta | 8 + .../VRLT_PoiVertexColors.poiTemplateCollection | 24 + ...VRLT_PoiVertexColors.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Poi_VertexOptions.meta | 8 + .../Poi_VertexOptions/VRLM_PoiVertexOptions.asset | 54 + .../VRLM_PoiVertexOptions.asset.meta | 8 + .../VRLT_PoiVertexOptions.poiTemplateCollection | 177 + ...RLT_PoiVertexOptions.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/Razgriz_UDIMDiscard.meta | 8 + .../Razgriz_UDIMDiscard/UDIMDiscard Demo.mat | 2223 ++ .../Razgriz_UDIMDiscard/UDIMDiscard Demo.mat.meta | 8 + .../Razgriz_UDIMDiscard/UDIM_Demo.fbx | Bin 0 -> 73164 bytes .../Razgriz_UDIMDiscard/UDIM_Demo.fbx.meta | 97 + .../Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset | 81 + .../VRLM_UDIMDiscard.asset.meta | 8 + .../VRLTC_UDIMDiscard.poiTemplateCollection | 86 + .../VRLTC_UDIMDiscard.poiTemplateCollection.meta | 10 + .../Editor/Poi_FeatureModules/ToDo.meta | 8 + .../Editor/Poi_FeatureModules/ToDo/Poi_.meta | 8 + .../Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset | 70 + .../ToDo/Poi_/VRLM_Poi.asset.meta | 8 + .../ToDo/Poi_/VRLT_Poi.poiTemplateCollection | 30 + .../ToDo/Poi_/VRLT_Poi.poiTemplateCollection.meta | 10 + .../ToDo/Poi_BlackLightMasking.meta | 8 + .../VRLM_PoiBlackLightMasking.asset | 70 + .../VRLM_PoiBlackLightMasking.asset.meta | 8 + ...VRLT_PoiBlackLightMasking.poiTemplateCollection | 30 + ...PoiBlackLightMasking.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/ToDo/Poi_StatsOverlay.meta | 8 + .../Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset | 66 + .../VRLM_PoiStatsOverlay.asset.meta | 8 + .../VRLT_PoiStatsOverlay.poiTemplateCollection | 311 + ...VRLT_PoiStatsOverlay.poiTemplateCollection.meta | 10 + .../ToDo/Poi_StylizedAnisoSpecular.meta | 8 + .../VRLM_PoiStylizedAnisoSpecular.asset | 70 + .../VRLM_PoiStylizedAnisoSpecular.asset.meta | 8 + ..._PoiStylizedAnisoSpecular.poiTemplateCollection | 30 + ...tylizedAnisoSpecular.poiTemplateCollection.meta | 10 + .../ToDo/Poi_SubSurfaceScattering.meta | 8 + .../VRLM_PoiSubSurfaceScattering.asset | 70 + .../VRLM_PoiSubSurfaceScattering.asset.meta | 8 + ...T_PoiSubSurfaceScattering.poiTemplateCollection | 30 + ...SubSurfaceScattering.poiTemplateCollection.meta | 10 + .../Poi_FeatureModules/ToDo/Poi_Voronoi.meta | 8 + .../ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset | 70 + .../ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset.meta | 8 + .../VRLT_PoiVoronoi.poiTemplateCollection | 30 + .../VRLT_PoiVoronoi.poiTemplateCollection.meta | 10 + .../VRLM_PoiModuleTemplate.asset | 75 + .../VRLM_PoiModuleTemplate.asset.meta | 8 + .../VRLT_PoiTemplateTemplate.poiTemplateCollection | 30 + ..._PoiTemplateTemplate.poiTemplateCollection.meta | 10 + .../ModularShader/Editor/Poi_HelperLibraries.meta | 8 + .../Poi_HelperLibraries/VRLM_PoiHelpers.asset | 48 + .../Poi_HelperLibraries/VRLM_PoiHelpers.asset.meta | 8 + .../VRLT_PoiHelperFunctions.poiTemplate | 1250 + .../VRLT_PoiHelperFunctions.poiTemplate.meta | 10 + .../VRLT_PoiMacrosAndDefines.poiTemplate | 42 + .../VRLT_PoiMacrosAndDefines.poiTemplate.meta | 10 + .../ModularShader/Editor/Poi_Passes.meta | 8 + .../Editor/Poi_Passes/Poi_AddPass.meta | 8 + .../Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset | 74 + .../Poi_AddPass/VRLM_PoiPassAdd.asset.meta | 8 + .../VRLTC_PoiAddPass.poiTemplateCollection | 41 + .../VRLTC_PoiAddPass.poiTemplateCollection.meta | 10 + .../VRLT_PoiFragmentProgramAdd.poiTemplate | 57 + .../VRLT_PoiFragmentProgramAdd.poiTemplate.meta | 10 + .../Editor/Poi_Passes/Poi_BasePass.meta | 8 + .../Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset | 74 + .../Poi_BasePass/VRLM_PoiPassBase.asset.meta | 8 + .../VRLTC_PoiBasePass.poiTemplateCollection | 43 + .../VRLTC_PoiBasePass.poiTemplateCollection.meta | 10 + .../VRLT_PoiFragmentProgramBase.poiTemplate | 62 + .../VRLT_PoiFragmentProgramBase.poiTemplate.meta | 10 + .../Editor/Poi_Passes/Poi_FragData.meta | 8 + .../Poi_FragData/VRLM_PoiFragmentInit.asset | 60 + .../Poi_FragData/VRLM_PoiFragmentInit.asset.meta | 8 + .../VRLTC_PoiFragmentData.poiTemplateCollection | 202 + ...RLTC_PoiFragmentData.poiTemplateCollection.meta | 10 + .../Editor/Poi_Passes/Poi_GrabPass.meta | 8 + .../Poi_GrabPass/VRLM_PoiPassGrabPass.asset | 39 + .../Poi_GrabPass/VRLM_PoiPassGrabPass.asset.meta | 8 + .../Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate | 5 + .../Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate.meta | 10 + .../Editor/Poi_Passes/Poi_OutlinePass.meta | 8 + .../Poi_OutlinePass/VRLM_PoiPassOutline.asset | 74 + .../Poi_OutlinePass/VRLM_PoiPassOutline.asset.meta | 8 + .../Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset | 75 + .../VRLM_PoiPassOutlineEarly.asset.meta | 8 + .../VRLTC_PoiOutlinePass.poiTemplateCollection | 55 + ...VRLTC_PoiOutlinePass.poiTemplateCollection.meta | 10 + .../VRLT_PoiFragmentProgramOutline.poiTemplate | 57 + ...VRLT_PoiFragmentProgramOutline.poiTemplate.meta | 10 + .../Editor/Poi_Passes/Poi_ShadowPass.meta | 8 + .../Poi_ShadowPass/VRLM_PoiPassShadow.asset | 75 + .../Poi_ShadowPass/VRLM_PoiPassShadow.asset.meta | 8 + .../VRLTC_PoiShadowPass.poiTemplateCollection | 41 + .../VRLTC_PoiShadowPass.poiTemplateCollection.meta | 10 + .../VRLT_PoiFragmentProgramShadow.poiTemplate | 54 + .../VRLT_PoiFragmentProgramShadow.poiTemplate.meta | 10 + .../Poi_Passes/VRLM_PoiVertFragSkeleton.asset | 72 + .../Poi_Passes/VRLM_PoiVertFragSkeleton.asset.meta | 8 + .../Poi_Passes/VRLT_PoiGenericPass.poiTemplate | 39 + .../VRLT_PoiGenericPass.poiTemplate.meta | 10 + .../Poi_Passes/VRLT_PoiInterpolators.poiTemplate | 35 + .../VRLT_PoiInterpolators.poiTemplate.meta | 10 + .../Poi_Passes/VRLT_PoiVertexProgram.poiTemplate | 83 + .../VRLT_PoiVertexProgram.poiTemplate.meta | 10 + .../ModularShader/Editor/Poi_RenderPresets.meta | 8 + .../Poi_RenderPresets/VRLM_RenderPresetsPro.asset | 48 + .../VRLM_RenderPresetsPro.asset.meta | 8 + .../VRLTC_PoiRenderPreset.poiTemplateCollection | 14 + ...RLTC_PoiRenderPreset.poiTemplateCollection.meta | 10 + .../ModularShader/Editor/Poi_UIBoilerPlater.meta | 8 + .../Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset | 80 + .../VRLM_UIBoilerPlate.asset.meta | 8 + .../VRLM_UIBoilerPlateGrabPass.asset | 87 + .../VRLM_UIBoilerPlateGrabPass.asset.meta | 8 + .../VRLM_UIBoilerPlateOutline.asset | 87 + .../VRLM_UIBoilerPlateOutline.asset.meta | 8 + ...VRLTC_PoiPropertySkeleton.poiTemplateCollection | 48 + ..._PoiPropertySkeleton.poiTemplateCollection.meta | 10 + .../VRLT_PropsUIBoilerPlate.poiTemplate | 14 + .../VRLT_PropsUIBoilerPlate.poiTemplate.meta | 10 + .../ModularShader/Editor/PoiyomiPro.asset | 85 + .../ModularShader/Editor/PoiyomiPro.asset.meta | 8 + .../ModularShader/Editor/PoiyomiProGrabPass.asset | 87 + .../Editor/PoiyomiProGrabPass.asset.meta | 8 + .../ModularShader/Editor/PoiyomiProOutline.asset | 87 + .../Editor/PoiyomiProOutline.asset.meta | 8 + .../Editor/PoiyomiProOutlineEarly.asset | 87 + .../Editor/PoiyomiProOutlineEarly.asset.meta | 8 + .../Editor/VRLT_PoiBaseTemplate.poiTemplate | 17 + .../Editor/VRLT_PoiBaseTemplate.poiTemplate.meta | 10 + .../ModularShader/Editor/VRLT_PoiEmpty.poiTemplate | 0 .../Editor/VRLT_PoiEmpty.poiTemplate.meta | 10 + .../_PoiyomiShaders/ModularShader/M_Floors.mat | 2327 ++ .../ModularShader/M_Floors.mat.meta | 8 + .../_PoiyomiShaders/ModularShader/M_PoiPro.mat | 2008 ++ .../ModularShader/M_PoiPro.mat.meta | 8 + .../ModularShader/M_PoiProGrabPass.mat | 1622 ++ .../ModularShader/M_PoiProGrabPass.mat.meta | 8 + .../ModularShader/M_PoiProOutline.mat | 1633 ++ .../ModularShader/M_PoiProOutline.mat.meta | 8 + .../ModularShader/M_PoiProOutlineEarly.mat | 1623 ++ .../ModularShader/M_PoiProOutlineEarly.mat.meta | 8 + .../_PoiyomiShaders/ModularShader/M_Testing 1.mat | 2297 ++ .../ModularShader/M_Testing 1.mat.meta | 8 + .../_PoiyomiShaders/ModularShader/M_Testing.mat | 1545 ++ .../ModularShader/M_Testing.mat.meta | 8 + .../_PoiyomiShaders/ModularShader/New Material.mat | 2207 ++ .../ModularShader/New Material.mat.meta | 8 + .../_PoiyomiShaders/ModularShader/Notes.cginc | 4 + .../_PoiyomiShaders/ModularShader/Notes.cginc.meta | 9 + .../ModularShader/OptimizedShaders.meta | 8 + .../ModularShader/OptimizedShaders/M_PoiPro.meta | 8 + .../OptimizedShaders/M_PoiPro/Poiyomi Pro.shader | 11569 +++++++++ .../M_PoiPro/Poiyomi Pro.shader.meta | 9 + .../ModularShader/PoiMSSEmbedSettings.json | 1 + .../ModularShader/PoiMSSEmbedSettings.json.meta | 7 + .../ModularShader/Poiyomi Pro Early Outline.shader | 25935 +++++++++++++++++++ .../Poiyomi Pro Early Outline.shader.meta | 15 + .../ModularShader/Poiyomi Pro Grab Pass.shader | 21374 +++++++++++++++ .../Poiyomi Pro Grab Pass.shader.meta | 15 + .../ModularShader/Poiyomi Pro Outline.shader | 25935 +++++++++++++++++++ .../ModularShader/Poiyomi Pro Outline.shader.meta | 15 + .../ModularShader/Poiyomi Pro.shader | 21033 +++++++++++++++ .../ModularShader/Poiyomi Pro.shader.meta | 15 + .../_PoiyomiShaders/ModularShader/TestScene.unity | 2631 ++ .../ModularShader/TestScene.unity.meta | 7 + .../Assets/_PoiyomiShaders/Presets.meta | 8 + .../Assets/_PoiyomiShaders/Presets/Lighting.meta | 8 + .../Presets/Lighting/MP_Lighting_FullUTS.mat | 1586 ++ .../Presets/Lighting/MP_Lighting_FullUTS.mat.meta | 8 + .../Presets/Lighting/MP_Lighting_HardToon.mat | 1557 ++ .../Presets/Lighting/MP_Lighting_HardToon.mat.meta | 8 + .../Presets/Lighting/MP_Lighting_Poi+UTS.mat | 1557 ++ .../Presets/Lighting/MP_Lighting_Poi+UTS.mat.meta | 8 + .../Presets/Lighting/MP_Lighting_Realistic.mat | 1583 ++ .../Lighting/MP_Lighting_Realistic.mat.meta | 8 + .../_PoiyomiShaders/Presets/Lighting/Test.mat | 1547 ++ .../_PoiyomiShaders/Presets/Lighting/Test.mat.meta | 8 + .../Presets/Reflections & Specular.meta | 8 + .../Reflections & Specular/MP_DullMetal.mat | 1554 ++ .../Reflections & Specular/MP_DullMetal.mat.meta | 8 + .../Reflections & Specular/MP_DullNonMetal.mat | 1554 ++ .../MP_DullNonMetal.mat.meta | 8 + .../Reflections & Specular/MP_ShinyMetal.mat | 1554 ++ .../Reflections & Specular/MP_ShinyMetal.mat.meta | 8 + .../Reflections & Specular/MP_ShinyNonMetal.mat | 1554 ++ .../MP_ShinyNonMetal.mat.meta | 8 + .../Assets/_PoiyomiShaders/Scripts.meta | 8 + .../Assets/_PoiyomiShaders/Scripts/Editor.meta | 8 + .../Scripts/Editor/ModularShaderSystem.meta | 8 + .../Editor/ModularShaderSystem/Editors.meta | 8 + .../ModularShaderSystem/Editors/Components.meta | 8 + .../Editors/Components/FunctionTimeline.cs | 651 + .../Editors/Components/FunctionTimeline.cs.meta | 11 + .../Editors/Components/TemplateGraph.cs | 293 + .../Editors/Components/TemplateGraph.cs.meta | 11 + .../ModularShaderSystem/Editors/Drawers.meta | 8 + .../Editors/Drawers/EnablePropertyDrawer.cs | 30 + .../Editors/Drawers/EnablePropertyDrawer.cs.meta | 11 + .../Editors/Drawers/FunctionPropertyDrawer.cs | 32 + .../Editors/Drawers/FunctionPropertyDrawer.cs.meta | 11 + .../Drawers/ModuleTemplatePropertyDrawer.cs | 29 + .../Drawers/ModuleTemplatePropertyDrawer.cs.meta | 11 + .../Editors/Drawers/PropertyAttributeDrawer.cs | 52 + .../Drawers/PropertyAttributeDrawer.cs.meta | 11 + .../Editors/Drawers/ShaderPropertyDrawer.cs | 289 + .../Editors/Drawers/ShaderPropertyDrawer.cs.meta | 11 + .../Editors/Drawers/VariablePropertyDrawer.cs | 43 + .../Editors/Drawers/VariablePropertyDrawer.cs.meta | 11 + .../ModularShaderSystem/Editors/Elements.meta | 8 + .../Editors/Elements/CodeViewElement.cs | 104 + .../Editors/Elements/CodeViewElement.cs.meta | 11 + .../Editors/Elements/InspectorList.cs | 324 + .../Editors/Elements/InspectorList.cs.meta | 11 + .../Editors/Elements/LabelField.cs | 56 + .../Editors/Elements/LabelField.cs.meta | 11 + .../Editors/Elements/ModuleInspectorList.cs | 315 + .../Editors/Elements/ModuleInspectorList.cs.meta | 11 + .../Editors/Elements/VariableField.cs | 30 + .../Editors/Elements/VariableField.cs.meta | 11 + .../ModularShaderSystem/Editors/Inspectors.meta | 8 + .../Editors/Inspectors/ModularShaderEditor.cs | 68 + .../Editors/Inspectors/ModularShaderEditor.cs.meta | 11 + .../Editors/Inspectors/ShaderModuleEditor.cs | 23 + .../Editors/Inspectors/ShaderModuleEditor.cs.meta | 11 + .../Editors/Inspectors/TemplateAssetEditor.cs | 20 + .../Editors/Inspectors/TemplateAssetEditor.cs.meta | 11 + .../ModularShaderSystem/Editors/Windows.meta | 8 + .../Editors/Windows/Migrator.cs | 814 + .../Editors/Windows/Migrator.cs.meta | 11 + .../Editors/Windows/ModularShaderDebugger.cs | 153 + .../Editors/Windows/ModularShaderDebugger.cs.meta | 11 + .../Editors/Windows/TextPopup.cs | 20 + .../Editors/Windows/TextPopup.cs.meta | 11 + .../Scripts/Editor/ModularShaderSystem/LICENSE | 21 + .../Editor/ModularShaderSystem/LICENSE.meta | 7 + .../Editor/ModularShaderSystem/MSSConstants.cs | 21 + .../ModularShaderSystem/MSSConstants.cs.meta | 11 + .../ModularShaderSystemDefinition.asmdef | 15 + .../ModularShaderSystemDefinition.asmdef.meta | 7 + .../Editor/ModularShaderSystem/Resources.meta | 8 + .../ModularShaderSystem/Resources/POIMSS.meta | 8 + .../Resources/POIMSS/MSSDeleteIcon.png | Bin 0 -> 2891 bytes .../Resources/POIMSS/MSSDeleteIcon.png.meta | 104 + .../Resources/POIMSS/MSSDownIcon.png | Bin 0 -> 1578 bytes .../Resources/POIMSS/MSSDownIcon.png.meta | 104 + .../Resources/POIMSS/MSSUIElements.meta | 8 + .../POIMSS/MSSUIElements/EnablePropertyDrawer.uxml | 6 + .../MSSUIElements/EnablePropertyDrawer.uxml.meta | 10 + .../MSSUIElements/FunctionPropertyDrawer.uxml | 9 + .../MSSUIElements/FunctionPropertyDrawer.uxml.meta | 10 + .../POIMSS/MSSUIElements/FunctionTimelineStyle.uss | 173 + .../MSSUIElements/FunctionTimelineStyle.uss.meta | 3 + .../POIMSS/MSSUIElements/FunctionView.uxml | 9 + .../POIMSS/MSSUIElements/FunctionView.uxml.meta | 10 + .../POIMSS/MSSUIElements/InspectorList.uss | 139 + .../POIMSS/MSSUIElements/InspectorList.uss.meta | 11 + .../POIMSS/MSSUIElements/MigratorDark.uss | 43 + .../POIMSS/MSSUIElements/MigratorDark.uss.meta | 3 + .../POIMSS/MSSUIElements/MigratorLight.uss | 42 + .../POIMSS/MSSUIElements/MigratorLight.uss.meta | 3 + .../MSSUIElements/ModularShaderDebuggerStyle.uss | 37 + .../ModularShaderDebuggerStyle.uss.meta | 3 + .../POIMSS/MSSUIElements/ModularShaderEditor.uxml | 17 + .../MSSUIElements/ModularShaderEditor.uxml.meta | 10 + .../ModuleTemplatePropertyDrawer.uxml | 6 + .../ModuleTemplatePropertyDrawer.uxml.meta | 10 + .../POIMSS/MSSUIElements/PropertyView.uxml | 6 + .../POIMSS/MSSUIElements/PropertyView.uxml.meta | 10 + .../POIMSS/MSSUIElements/ShaderModuleEditor.uxml | 16 + .../MSSUIElements/ShaderModuleEditor.uxml.meta | 10 + .../POIMSS/MSSUIElements/ShaderPropertyDrawer.uxml | 9 + .../MSSUIElements/ShaderPropertyDrawer.uxml.meta | 10 + .../POIMSS/MSSUIElements/TemplateGraphStyle.uss | 15 + .../MSSUIElements/TemplateGraphStyle.uss.meta | 3 + .../MSSUIElements/VariablePropertyDrawer.uxml | 5 + .../MSSUIElements/VariablePropertyDrawer.uxml.meta | 10 + .../Resources/POIMSS/MSSUpIcon.png | Bin 0 -> 1572 bytes .../Resources/POIMSS/MSSUpIcon.png.meta | 104 + .../Resources/POIMSS/ModularShaderIcon.png | Bin 0 -> 8796 bytes .../Resources/POIMSS/ModularShaderIcon.png.meta | 104 + .../Resources/POIMSS/RobotoMono-Regular.ttf | Bin 0 -> 86908 bytes .../Resources/POIMSS/RobotoMono-Regular.ttf.meta | 3 + .../Resources/POIMSS/ShaderModuleIcon.png | Bin 0 -> 3518 bytes .../Resources/POIMSS/ShaderModuleIcon.png.meta | 104 + .../Resources/POIMSS/TemplateCollectionIcon.png | Bin 0 -> 5121 bytes .../POIMSS/TemplateCollectionIcon.png.meta | 104 + .../Resources/POIMSS/TemplateIcon.png | Bin 0 -> 1470 bytes .../Resources/POIMSS/TemplateIcon.png.meta | 104 + .../Editor/ModularShaderSystem/Scriptables.meta | 8 + .../Scriptables/EnableProperty.cs | 60 + .../Scriptables/EnableProperty.cs.meta | 11 + .../Scriptables/ModularShader.cs | 41 + .../Scriptables/ModularShader.cs.meta | 11 + .../Scriptables/ModuleTemplate.cs | 19 + .../Scriptables/ModuleTemplate.cs.meta | 11 + .../ModularShaderSystem/Scriptables/Property.cs | 89 + .../Scriptables/Property.cs.meta | 11 + .../Scriptables/ShaderFunction.cs | 25 + .../Scriptables/ShaderFunction.cs.meta | 11 + .../Scriptables/ShaderModule.cs | 34 + .../Scriptables/ShaderModule.cs.meta | 11 + .../Scriptables/TemplateAsset.cs | 48 + .../Scriptables/TemplateAsset.cs.meta | 11 + .../Scriptables/TemplateAssetImporter.cs | 39 + .../Scriptables/TemplateAssetImporter.cs.meta | 11 + .../Scriptables/TemplateCollectionAsset.cs | 47 + .../Scriptables/TemplateCollectionAsset.cs.meta | 11 + .../Scriptables/TemplateCollectionAssetImporter.cs | 86 + .../TemplateCollectionAssetImporter.cs.meta | 11 + .../ModularShaderSystem/Scriptables/Variable.cs | 138 + .../Scriptables/Variable.cs.meta | 11 + .../Editor/ModularShaderSystem/ShaderGenerator.cs | 930 + .../ModularShaderSystem/ShaderGenerator.cs.meta | 11 + .../ShaderStringBuilderExtensions.cs | 103 + .../ShaderStringBuilderExtensions.cs.meta | 11 + .../Assets/_PoiyomiShaders/Scripts/ThryEditor.meta | 8 + .../_PoiyomiShaders/Scripts/ThryEditor/Editor.meta | 8 + .../Scripts/ThryEditor/Editor/Config.cs | 185 + .../Scripts/ThryEditor/Editor/Config.cs.meta | 11 + .../Scripts/ThryEditor/Editor/DataStructs.cs | 621 + .../Scripts/ThryEditor/Editor/DataStructs.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Drawers.cs | 1179 + .../Scripts/ThryEditor/Editor/Drawers.cs.meta | 11 + .../Scripts/ThryEditor/Editor/EditorChanger.cs | 166 + .../ThryEditor/Editor/EditorChanger.cs.meta | 11 + .../Scripts/ThryEditor/Editor/EditorStructs.cs | 835 + .../ThryEditor/Editor/EditorStructs.cs.meta | 11 + .../Scripts/ThryEditor/Editor/GUIHelper.cs | 961 + .../Scripts/ThryEditor/Editor/GUIHelper.cs.meta | 11 + .../Scripts/ThryEditor/Editor/GradiantEditor.cs | 258 + .../ThryEditor/Editor/GradiantEditor.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Helper.cs | 1583 ++ .../Scripts/ThryEditor/Editor/Helper.cs.meta | 11 + .../Scripts/ThryEditor/Editor/HelperWeb.cs | 227 + .../Scripts/ThryEditor/Editor/HelperWeb.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Locale.cs | 162 + .../Scripts/ThryEditor/Editor/Locale.cs.meta | 11 + .../Scripts/ThryEditor/Editor/MaterialLinker.cs | 260 + .../ThryEditor/Editor/MaterialLinker.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Mediator.cs | 25 + .../Scripts/ThryEditor/Editor/Mediator.cs.meta | 11 + .../Scripts/ThryEditor/Editor/ModuleHandler.cs | 367 + .../ThryEditor/Editor/ModuleHandler.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Parser.cs | 408 + .../Scripts/ThryEditor/Editor/Parser.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Presets.cs | 360 + .../Scripts/ThryEditor/Editor/Presets.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Settings.cs | 413 + .../Scripts/ThryEditor/Editor/Settings.cs.meta | 11 + .../Scripts/ThryEditor/Editor/ShaderOptimizer.cs | 1997 ++ .../ThryEditor/Editor/ShaderOptimizer.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Styles.cs | 85 + .../Scripts/ThryEditor/Editor/Styles.cs.meta | 11 + .../Editor/ThryAssemblyDefinition.asmdef | 14 + .../Editor/ThryAssemblyDefinition.asmdef.meta | 7 + .../Scripts/ThryEditor/Editor/ThryEditor.cs | 719 + .../Scripts/ThryEditor/Editor/ThryEditor.cs.meta | 11 + .../Scripts/ThryEditor/Editor/ThryFileBuilder.cs | 65 + .../ThryEditor/Editor/ThryFileBuilder.cs.meta | 11 + .../Scripts/ThryEditor/Editor/Unity.cs | 217 + .../Scripts/ThryEditor/Editor/Unity.cs.meta | 11 + .../Scripts/ThryEditor/Examples.meta | 8 + .../Scripts/ThryEditor/Examples/Example1.shader | 440 + .../ThryEditor/Examples/Example1.shader.meta | 8 + .../Scripts/ThryEditor/Examples/Example2.shader | 435 + .../ThryEditor/Examples/Example2.shader.meta | 8 + .../ThryEditor/Examples/ThryLabelExample.txt | 6 + .../ThryEditor/Examples/ThryLabelExample.txt.meta | 7 + .../ThryEditor/Examples/ThryPresetsExample.txt | 0 .../Examples/ThryPresetsExample.txt.meta | 7 + .../ThryEditor/Examples/thry_locale_example.csv | 3 + .../Examples/thry_locale_example.csv.meta | 7 + .../_PoiyomiShaders/Scripts/ThryEditor/LICENSE.md | 674 + .../Scripts/ThryEditor/LICENSE.md.meta | 7 + .../_PoiyomiShaders/Scripts/ThryEditor/README.md | 4 + .../Scripts/ThryEditor/README.md.meta | 7 + .../Scripts/ThryEditor/Resources.meta | 8 + .../ThryEditor/Resources/thryEditor_link.png | Bin 0 -> 262 bytes .../ThryEditor/Resources/thryEditor_link.png.meta | 104 + .../Scripts/ThryEditor/Resources/thry_rect.png | Bin 0 -> 9459 bytes .../ThryEditor/Resources/thry_rect.png.meta | 116 + .../_PoiyomiShaders/Scripts/ThryEditor/docs.html | 639 + .../Scripts/ThryEditor/docs.html.meta | 7 + .../Scripts/ThryEditor/thry_editor_locale.csv | 48 + .../Scripts/ThryEditor/thry_editor_locale.csv.meta | 7 + .../Assets/_PoiyomiShaders/Scripts/poi-tools.meta | 8 + .../_PoiyomiShaders/Scripts/poi-tools/Editor.meta | 8 + .../poi-tools/Editor/BakeToVertexColorsEditor.cs | 360 + .../Editor/BakeToVertexColorsEditor.cs.meta | 11 + .../Scripts/poi-tools/Editor/GradientFlood.cs | 410 + .../Scripts/poi-tools/Editor/GradientFlood.cs.meta | 11 + .../Editor/ModularShadersGeneratorWindow.cs | 211 + .../Editor/ModularShadersGeneratorWindow.cs.meta | 3 + .../Scripts/poi-tools/Editor/PoiData.cs | 70 + .../Scripts/poi-tools/Editor/PoiData.cs.meta | 11 + .../Scripts/poi-tools/Editor/PoiHelpers.cs | 190 + .../Scripts/poi-tools/Editor/PoiHelpers.cs.meta | 11 + .../Scripts/poi-tools/Editor/TextureUtility.cs | 1244 + .../poi-tools/Editor/TextureUtility.cs.meta | 11 + .../Scripts/poi-tools/Resources.meta | 8 + .../Scripts/poi-tools/Resources/Poi.meta | 8 + .../Resources/Poi/ModularShadersGeneratorStyle.uss | 26 + .../Poi/ModularShadersGeneratorStyle.uss.meta | 3 + .../Resources/Poi/PoiTexturePacker.shader | 169 + .../Resources/Poi/PoiTexturePacker.shader.meta | 9 + .../Resources/Poi/PoiTextureUnpacker.shader | 156 + .../Resources/Poi/PoiTextureUnpacker.shader.meta | 9 + .../Scripts/poi-tools/Resources/Poi/icon_link.png | Bin 0 -> 15756 bytes .../poi-tools/Resources/Poi/icon_link.png.meta | 99 + .../poi-tools/Resources/Poi/icon_link_pro.png | Bin 0 -> 25238 bytes .../poi-tools/Resources/Poi/icon_link_pro.png.meta | 99 + .../Assets/_PoiyomiShaders/Shaders.meta | 8 + .../Assets/_PoiyomiShaders/Shaders/Extras.meta | 8 + .../Shaders/Extras/InvisStencil.shader | 72 + .../Shaders/Extras/InvisStencil.shader.meta | 9 + .../Shaders/Extras/MasterScanner.shader | 62 + .../Shaders/Extras/MasterScanner.shader.meta | 8 + .../Assets/_PoiyomiShaders/Shaders/Includes.meta | 8 + .../Shaders/Includes/CGI_FurLighting.cginc | 345 + .../Shaders/Includes/CGI_FurLighting.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiAlphaToCoverage.cginc | 29 + .../Includes/CGI_PoiAlphaToCoverage.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiBackFace.cginc | 29 + .../Shaders/Includes/CGI_PoiBackFace.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiBlackLight.cginc | 53 + .../Shaders/Includes/CGI_PoiBlackLight.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiBlending.cginc | 37 + .../Shaders/Includes/CGI_PoiBlending.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiBulge.cginc | 38 + .../Shaders/Includes/CGI_PoiBulge.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiClearCoat.cginc | 108 + .../Shaders/Includes/CGI_PoiClearCoat.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiColors.cginc | 180 + .../Shaders/Includes/CGI_PoiColors.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiData.cginc | 188 + .../Shaders/Includes/CGI_PoiData.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDebug.cginc | 102 + .../Shaders/Includes/CGI_PoiDebug.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDecal.cginc | 45 + .../Shaders/Includes/CGI_PoiDecal.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDefines.cginc | 21 + .../Shaders/Includes/CGI_PoiDefines.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDepthColor.cginc | 43 + .../Shaders/Includes/CGI_PoiDepthColor.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDissolve.cginc | 216 + .../Shaders/Includes/CGI_PoiDissolve.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiDithering.cginc | 34 + .../Shaders/Includes/CGI_PoiDithering.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiEmission.cginc | 198 + .../Shaders/Includes/CGI_PoiEmission.cginc.meta | 9 + .../Includes/CGI_PoiEnvironmentalRimLighting.cginc | 43 + .../CGI_PoiEnvironmentalRimLighting.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiFlipbook.cginc | 155 + .../Shaders/Includes/CGI_PoiFlipbook.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiFrag.cginc | 360 + .../Shaders/Includes/CGI_PoiFrag.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiFur.cginc | 40 + .../Shaders/Includes/CGI_PoiFur.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiFurCardPass.cginc | 200 + .../Shaders/Includes/CGI_PoiFurCardPass.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiGeom.cginc | 10 + .../Shaders/Includes/CGI_PoiGeom.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiGeomFur.cginc | 37 + .../Shaders/Includes/CGI_PoiGeomFur.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiGlitter.cginc | 229 + .../Shaders/Includes/CGI_PoiGlitter.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiGrab.cginc | 109 + .../Shaders/Includes/CGI_PoiGrab.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiHelpers.cginc | 294 + .../Shaders/Includes/CGI_PoiHelpers.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiHologram.cginc | 36 + .../Shaders/Includes/CGI_PoiHologram.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiIridescence.cginc | 61 + .../Shaders/Includes/CGI_PoiIridescence.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiLighting.cginc | 409 + .../Shaders/Includes/CGI_PoiLighting.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMSDF.cginc | 235 + .../Shaders/Includes/CGI_PoiMSDF.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMacros.cginc | 29 + .../Shaders/Includes/CGI_PoiMacros.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMainTex.cginc | 159 + .../Shaders/Includes/CGI_PoiMainTex.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMatcap.cginc | 105 + .../Shaders/Includes/CGI_PoiMatcap.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMath.cginc | 78 + .../Shaders/Includes/CGI_PoiMath.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMetal.cginc | 126 + .../Shaders/Includes/CGI_PoiMetal.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiMirror.cginc | 77 + .../Shaders/Includes/CGI_PoiMirror.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiOutlineFrag.cginc | 76 + .../Shaders/Includes/CGI_PoiOutlineFrag.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiOutlineVert.cginc | 90 + .../Shaders/Includes/CGI_PoiOutlineVert.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiPanosphere.cginc | 70 + .../Shaders/Includes/CGI_PoiPanosphere.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiParallax.cginc | 142 + .../Shaders/Includes/CGI_PoiParallax.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiPass.cginc | 263 + .../Shaders/Includes/CGI_PoiPass.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiPassOutline.cginc | 26 + .../Shaders/Includes/CGI_PoiPassOutline.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiPassShadow.cginc | 31 + .../Shaders/Includes/CGI_PoiPassShadow.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiRGBMask.cginc | 51 + .../Shaders/Includes/CGI_PoiRGBMask.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiRNG.cginc | 4 + .../Shaders/Includes/CGI_PoiRNG.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiRandom.cginc | 39 + .../Shaders/Includes/CGI_PoiRandom.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiRimLighting.cginc | 53 + .../Shaders/Includes/CGI_PoiRimLighting.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiShadowFrag.cginc | 95 + .../Shaders/Includes/CGI_PoiShadowFrag.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiShadowIncludes.cginc | 41 + .../Includes/CGI_PoiShadowIncludes.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiShadowVert.cginc | 73 + .../Shaders/Includes/CGI_PoiShadowVert.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiSpawnInFrag.cginc | 54 + .../Shaders/Includes/CGI_PoiSpawnInFrag.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiSpawnInVert.cginc | 40 + .../Shaders/Includes/CGI_PoiSpawnInVert.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiSpecular.cginc | 478 + .../Shaders/Includes/CGI_PoiSpecular.cginc.meta | 9 + .../Includes/CGI_PoiSubsurfaceScattering.cginc | 28 + .../CGI_PoiSubsurfaceScattering.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiTessellation.cginc | 117 + .../Includes/CGI_PoiTessellation.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiUVDistortion.cginc | 22 + .../Includes/CGI_PoiUVDistortion.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiV2F.cginc | 34 + .../Shaders/Includes/CGI_PoiV2F.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiVert.cginc | 107 + .../Shaders/Includes/CGI_PoiVert.cginc.meta | 9 + .../Includes/CGI_PoiVertexManipulations.cginc | 97 + .../Includes/CGI_PoiVertexManipulations.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiVideo.cginc | 267 + .../Shaders/Includes/CGI_PoiVideo.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiVoronoi.cginc | 294 + .../Shaders/Includes/CGI_PoiVoronoi.cginc.meta | 9 + .../Shaders/Includes/CGI_PoiWireframe.cginc | 111 + .../Shaders/Includes/CGI_PoiWireframe.cginc.meta | 9 + .../Shaders/Includes/CGI_Poicludes.cginc | 176 + .../Shaders/Includes/CGI_Poicludes.cginc.meta | 9 + .../_PoiyomiShaders/Shaders/Includes/Notes.txt | 7 + .../Shaders/Includes/Notes.txt.meta | 7 + .../Assets/_PoiyomiShaders/Shaders/Patreon.meta | 8 + .../Shaders/Patreon/DepthGet.prefab | 71 + .../Shaders/Patreon/DepthGet.prefab.meta | 8 + .../_PoiyomiShaders/Shaders/Patreon/EyeFX.meta | 8 + .../Shaders/Patreon/EyeFX/PoiyomiEyeFX.shader | 163 + .../Shaders/Patreon/EyeFX/PoiyomiEyeFX.shader.meta | 8 + .../_PoiyomiShaders/Shaders/Patreon/Fur.meta | 8 + .../_PoiyomiShaders/Shaders/Patreon/Fur/Pro.meta | 8 + .../Shaders/Patreon/Fur/Pro/Includes.meta | 8 + .../Fur/Pro/Includes/CGI_FunctionsArtistic.cginc | 369 + .../Pro/Includes/CGI_FunctionsArtistic.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiAlphaToCoverage.cginc | 32 + .../Pro/Includes/CGI_PoiAlphaToCoverage.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiAudioLink.cginc | 128 + .../Fur/Pro/Includes/CGI_PoiAudioLink.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiBRDF.cginc | 253 + .../Fur/Pro/Includes/CGI_PoiBRDF.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiBackFace.cginc | 49 + .../Fur/Pro/Includes/CGI_PoiBackFace.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiBlackLight.cginc | 56 + .../Fur/Pro/Includes/CGI_PoiBlackLight.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiBlending.cginc | 385 + .../Fur/Pro/Includes/CGI_PoiBlending.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiBulge.cginc | 41 + .../Fur/Pro/Includes/CGI_PoiBulge.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiClearCoat.cginc | 327 + .../Fur/Pro/Includes/CGI_PoiClearCoat.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiData.cginc | 265 + .../Fur/Pro/Includes/CGI_PoiData.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiDebug.cginc | 107 + .../Fur/Pro/Includes/CGI_PoiDebug.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiDecal.cginc | 331 + .../Fur/Pro/Includes/CGI_PoiDecal.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiDefines.cginc | 22 + .../Fur/Pro/Includes/CGI_PoiDefines.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiDepthColor.cginc | 129 + .../Fur/Pro/Includes/CGI_PoiDepthColor.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiDissolve.cginc | 237 + .../Fur/Pro/Includes/CGI_PoiDissolve.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiDithering.cginc | 34 + .../Fur/Pro/Includes/CGI_PoiDithering.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiEmission.cginc | 341 + .../Fur/Pro/Includes/CGI_PoiEmission.cginc.meta | 9 + .../Includes/CGI_PoiEnvironmentalRimLighting.cginc | 48 + .../CGI_PoiEnvironmentalRimLighting.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiFlipbook.cginc | 221 + .../Fur/Pro/Includes/CGI_PoiFlipbook.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiFrag.cginc | 422 + .../Fur/Pro/Includes/CGI_PoiFrag.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiFur.cginc | 41 + .../Patreon/Fur/Pro/Includes/CGI_PoiFur.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiGeomFur.cginc | 37 + .../Fur/Pro/Includes/CGI_PoiGeomFur.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiGlitter.cginc | 274 + .../Fur/Pro/Includes/CGI_PoiGlitter.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiGrab.cginc | 125 + .../Fur/Pro/Includes/CGI_PoiGrab.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiHelpers.cginc | 336 + .../Fur/Pro/Includes/CGI_PoiHelpers.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiHologram.cginc | 44 + .../Fur/Pro/Includes/CGI_PoiHologram.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiIridescence.cginc | 104 + .../Fur/Pro/Includes/CGI_PoiIridescence.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiLighting.cginc | 981 + .../Fur/Pro/Includes/CGI_PoiLighting.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMSDF.cginc | 243 + .../Fur/Pro/Includes/CGI_PoiMSDF.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMacros.cginc | 40 + .../Fur/Pro/Includes/CGI_PoiMacros.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMainTex.cginc | 193 + .../Fur/Pro/Includes/CGI_PoiMainTex.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMatcap.cginc | 160 + .../Fur/Pro/Includes/CGI_PoiMatcap.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMath.cginc | 100 + .../Fur/Pro/Includes/CGI_PoiMath.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMetal.cginc | 130 + .../Fur/Pro/Includes/CGI_PoiMetal.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiMirror.cginc | 81 + .../Fur/Pro/Includes/CGI_PoiMirror.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiOutlineFrag.cginc | 117 + .../Fur/Pro/Includes/CGI_PoiOutlineFrag.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiOutlineVert.cginc | 144 + .../Fur/Pro/Includes/CGI_PoiOutlineVert.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiPanosphere.cginc | 80 + .../Fur/Pro/Includes/CGI_PoiPanosphere.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiParallax.cginc | 166 + .../Fur/Pro/Includes/CGI_PoiParallax.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiPass.cginc | 252 + .../Fur/Pro/Includes/CGI_PoiPass.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiPassOutline.cginc | 34 + .../Fur/Pro/Includes/CGI_PoiPassOutline.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiPassShadow.cginc | 46 + .../Fur/Pro/Includes/CGI_PoiPassShadow.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiPathing.cginc | 150 + .../Fur/Pro/Includes/CGI_PoiPathing.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiPenetration.cginc | 0 .../Fur/Pro/Includes/CGI_PoiPenetration.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiRGBMask.cginc | 191 + .../Fur/Pro/Includes/CGI_PoiRGBMask.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiRandom.cginc | 41 + .../Fur/Pro/Includes/CGI_PoiRandom.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiRimLighting.cginc | 99 + .../Fur/Pro/Includes/CGI_PoiRimLighting.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiShadowFrag.cginc | 143 + .../Fur/Pro/Includes/CGI_PoiShadowFrag.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiShadowIncludes.cginc | 44 + .../Pro/Includes/CGI_PoiShadowIncludes.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiShadowVert.cginc | 86 + .../Fur/Pro/Includes/CGI_PoiShadowVert.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiSpawnInFrag.cginc | 58 + .../Fur/Pro/Includes/CGI_PoiSpawnInFrag.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiSpawnInVert.cginc | 40 + .../Fur/Pro/Includes/CGI_PoiSpawnInVert.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiSpecular.cginc | 505 + .../Fur/Pro/Includes/CGI_PoiSpecular.cginc.meta | 9 + .../Pro/Includes/CGI_PoiSubsurfaceScattering.cginc | 75 + .../CGI_PoiSubsurfaceScattering.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiTessellation.cginc | 117 + .../Pro/Includes/CGI_PoiTessellation.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiUVDistortion.cginc | 74 + .../Pro/Includes/CGI_PoiUVDistortion.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiV2F.cginc | 35 + .../Patreon/Fur/Pro/Includes/CGI_PoiV2F.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiVert.cginc | 145 + .../Fur/Pro/Includes/CGI_PoiVert.cginc.meta | 9 + .../Pro/Includes/CGI_PoiVertexManipulations.cginc | 102 + .../Includes/CGI_PoiVertexManipulations.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiVideo.cginc | 297 + .../Fur/Pro/Includes/CGI_PoiVideo.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_PoiVoronoi.cginc | 312 + .../Fur/Pro/Includes/CGI_PoiVoronoi.cginc.meta | 9 + .../Fur/Pro/Includes/CGI_PoiWireframe.cginc | 111 + .../Fur/Pro/Includes/CGI_PoiWireframe.cginc.meta | 9 + .../Patreon/Fur/Pro/Includes/CGI_Poicludes.cginc | 179 + .../Fur/Pro/Includes/CGI_Poicludes.cginc.meta | 9 + .../Shaders/Patreon/Fur/Pro/Includes/Notes.txt | 7 + .../Patreon/Fur/Pro/Includes/Notes.txt.meta | 7 + .../Shaders/Patreon/Fur/Pro/Shaders.meta | 8 + .../Patreon/Fur/Pro/Shaders/S_Poiyomi_Pro.shader | 2024 ++ .../Fur/Pro/Shaders/S_Poiyomi_Pro.shader.meta | 111 + .../Shaders/Patreon/LocalParticles.meta | 8 + .../Shaders/Patreon/LocalParticles/Shaders.meta | 8 + .../Patreon/LocalParticles/Shaders/Includes.meta | 8 + .../Shaders/Includes/PoiClearCoat.cginc | 78 + .../Shaders/Includes/PoiClearCoat.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiData.cginc | 104 + .../Shaders/Includes/PoiData.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiDebug.cginc | 123 + .../Shaders/Includes/PoiDebug.cginc.meta | 8 + .../Shaders/Includes/PoiDissolve.cginc | 200 + .../Shaders/Includes/PoiDissolve.cginc.meta | 8 + .../Shaders/Includes/PoiDragNDropLighting.cginc | 100 + .../Includes/PoiDragNDropLighting.cginc.meta | 8 + .../Shaders/Includes/PoiEmission.cginc | 74 + .../Shaders/Includes/PoiEmission.cginc.meta | 8 + .../Shaders/Includes/PoiFlipbook.cginc | 70 + .../Shaders/Includes/PoiFlipbook.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiFrag.cginc | 196 + .../Shaders/Includes/PoiFrag.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiGeom.cginc | 10 + .../Shaders/Includes/PoiGeom.cginc.meta | 8 + .../Shaders/Includes/PoiHelpers.cginc | 166 + .../Shaders/Includes/PoiHelpers.cginc.meta | 8 + .../Shaders/Includes/PoiLighting.cginc | 130 + .../Shaders/Includes/PoiLighting.cginc.meta | 8 + .../Shaders/Includes/PoiMainTex.cginc | 111 + .../Shaders/Includes/PoiMainTex.cginc.meta | 8 + .../Shaders/Includes/PoiMatcap.cginc | 82 + .../Shaders/Includes/PoiMatcap.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiMetal.cginc | 82 + .../Shaders/Includes/PoiMetal.cginc.meta | 8 + .../Shaders/Includes/PoiMirror.cginc | 77 + .../Shaders/Includes/PoiMirror.cginc.meta | 8 + .../Shaders/Includes/PoiOutlineFrag.cginc | 55 + .../Shaders/Includes/PoiOutlineFrag.cginc.meta | 8 + .../Shaders/Includes/PoiOutlineVert.cginc | 72 + .../Shaders/Includes/PoiOutlineVert.cginc.meta | 8 + .../Shaders/Includes/PoiPanosphere.cginc | 55 + .../Shaders/Includes/PoiPanosphere.cginc.meta | 8 + .../Shaders/Includes/PoiParallax.cginc | 121 + .../Shaders/Includes/PoiParallax.cginc.meta | 8 + .../Shaders/Includes/PoiParticlePass.cginc | 343 + .../Shaders/Includes/PoiParticlePass.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiPass.cginc | 124 + .../Shaders/Includes/PoiPass.cginc.meta | 8 + .../Shaders/Includes/PoiPassOutline.cginc | 15 + .../Shaders/Includes/PoiPassOutline.cginc.meta | 8 + .../Shaders/Includes/PoiPassShadow.cginc | 17 + .../Shaders/Includes/PoiPassShadow.cginc.meta | 8 + .../Shaders/Includes/PoiRandom.cginc | 39 + .../Shaders/Includes/PoiRandom.cginc.meta | 8 + .../Shaders/Includes/PoiRefraction.cginc | 50 + .../Shaders/Includes/PoiRefraction.cginc.meta | 8 + .../Shaders/Includes/PoiRimLighting.cginc | 95 + .../Shaders/Includes/PoiRimLighting.cginc.meta | 8 + .../Shaders/Includes/PoiShadowFrag.cginc | 44 + .../Shaders/Includes/PoiShadowFrag.cginc.meta | 8 + .../Shaders/Includes/PoiShadowIncludes.cginc | 33 + .../Shaders/Includes/PoiShadowIncludes.cginc.meta | 8 + .../Shaders/Includes/PoiShadowVert.cginc | 18 + .../Shaders/Includes/PoiShadowVert.cginc.meta | 8 + .../Shaders/Includes/PoiSpecular.cginc | 207 + .../Shaders/Includes/PoiSpecular.cginc.meta | 8 + .../Shaders/Includes/PoiSubsurfaceScattering.cginc | 35 + .../Includes/PoiSubsurfaceScattering.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiTouch.cginc | 33 + .../Shaders/Includes/PoiTouch.cginc.meta | 8 + .../LocalParticles/Shaders/Includes/PoiVert.cginc | 63 + .../Shaders/Includes/PoiVert.cginc.meta | 8 + .../Shaders/Includes/Poicludes.cginc | 147 + .../Shaders/Includes/Poicludes.cginc.meta | 8 + .../Patreon/LocalParticles/Shaders/Toon.meta | 8 + .../Shaders/Toon/OutlinesPoiyomiToonCutout.shader | 667 + .../Toon/OutlinesPoiyomiToonCutout.shader.meta | 8 + .../Toon/OutlinesPoiyomiToonTransparent.shader | 671 + .../OutlinesPoiyomiToonTransparent.shader.meta | 8 + .../Shaders/Toon/PoiyomiToonCutout.shader | 596 + .../Shaders/Toon/PoiyomiToonCutout.shader.meta | 27 + .../Shaders/Toon/PoiyomiToonTransparent.shader | 601 + .../Toon/PoiyomiToonTransparent.shader.meta | 27 + .../_PoiyomiShaders/Shaders/Patreon/NameTag.meta | 8 + .../Shaders/Patreon/NameTag/NameTagMaterial 1.mat | 245 + .../Patreon/NameTag/NameTagMaterial 1.mat.meta | 8 + .../Shaders/Patreon/NameTag/NameTagMaterial 2.mat | 245 + .../Patreon/NameTag/NameTagMaterial 2.mat.meta | 8 + .../Shaders/Patreon/NameTag/NameTagMaterial.mat | 247 + .../Patreon/NameTag/NameTagMaterial.mat.meta | 8 + .../Shaders/Patreon/NameTag/NameTagPrefab.prefab | 84 + .../Patreon/NameTag/NameTagPrefab.prefab.meta | 8 + .../Shaders/Patreon/NameTag/PoiyomiNameTag.shader | 179 + .../Patreon/NameTag/PoiyomiNameTag.shader.meta | 8 + .../Shaders/Patreon/NameTag/Ring (1).fbx | Bin 0 -> 15132 bytes .../Shaders/Patreon/NameTag/Ring (1).fbx.meta | 91 + .../Shaders/Patreon/NameTag/YourName.png | Bin 0 -> 13698 bytes .../Shaders/Patreon/NameTag/YourName.png.meta | 76 + .../Shaders/Patreon/NameTag/poiyomi.png | Bin 0 -> 8466 bytes .../Shaders/Patreon/NameTag/poiyomi.png.meta | 99 + .../Shaders/Patreon/S_T_Cutout_PPC.shader | 1244 + .../Shaders/Patreon/S_T_Cutout_PPC.shader.meta | 84 + .../Shaders/Patreon/S_T_Cutout_PPCO.shader | 1325 + .../Shaders/Patreon/S_T_Cutout_PPCO.shader.meta | 86 + .../Shaders/Patreon/S_T_Transparent_PPT.shader | 1245 + .../Patreon/S_T_Transparent_PPT.shader.meta | 84 + .../Shaders/Patreon/S_WireframeCutout_PPC.shader | 1243 + .../Patreon/S_WireframeCutout_PPC.shader.meta | 8 + .../Patreon/S_WireframeTransparent_PPT.shader | 1244 + .../Patreon/S_WireframeTransparent_PPT.shader.meta | 8 + .../Patreon/S_WireframeTransparent_PPT_label | 602 + .../Patreon/S_WireframeTransparent_PPT_label.meta | 7 + .../Patreon/S_WireframeTransparent_PPT_locale.csv | 1205 + .../S_WireframeTransparent_PPT_locale.csv.meta | 7 + .../Shaders/Patreon/ShatterWave2.meta | 8 + .../Patreon/ShatterWave2/PoiShatterHelpers.cginc | 20 + .../ShatterWave2/PoiShatterHelpers.cginc.meta | 8 + .../Shaders/Patreon/ShatterWave2/Shatter.mat | 220 + .../Shaders/Patreon/ShatterWave2/Shatter.mat.meta | 8 + .../Shaders/Patreon/ShatterWave2/ShatterPass.cginc | 517 + .../Patreon/ShatterWave2/ShatterPass.cginc.meta | 8 + .../Patreon/ShatterWave2/ShatterWave2.shader | 264 + .../Patreon/ShatterWave2/ShatterWave2.shader.meta | 22 + .../_PoiyomiShaders/Shaders/Patreon/Test.unity | 528 + .../Shaders/Patreon/Test.unity.meta | 7 + .../Shaders/Patreon/Untitled-1 copy 1.png | Bin 0 -> 9965 bytes .../Shaders/Patreon/Untitled-1 copy 1.png.meta | 99 + .../Shaders/Patreon/Untitled-1 copy.png | Bin 0 -> 7515 bytes .../Shaders/Patreon/Untitled-1 copy.png.meta | 99 + .../_PoiyomiShaders/Shaders/Patreon/Video.meta | 8 + .../Shaders/Patreon/Video/Textures.meta | 8 + .../Shaders/Patreon/Video/Textures/GameboyRamp.png | Bin 0 -> 6026 bytes .../Patreon/Video/Textures/GameboyRamp.png.meta | 86 + .../Shaders/Patreon/Video/Textures/PIX_CRT.png | Bin 0 -> 9338 bytes .../Patreon/Video/Textures/PIX_CRT.png.meta | 99 + .../Shaders/Patreon/Video/Textures/PIX_IPS.png | Bin 0 -> 133998 bytes .../Patreon/Video/Textures/PIX_IPS.png.meta | 99 + .../Shaders/Patreon/Video/Textures/PIX_LCD.png | Bin 0 -> 4733 bytes .../Patreon/Video/Textures/PIX_LCD.png.meta | 99 + .../Shaders/Patreon/Video/Textures/PIX_OLED.png | Bin 0 -> 5871 bytes .../Patreon/Video/Textures/PIX_OLED.png.meta | 99 + .../Shaders/Patreon/VoxelCubed.meta | 8 + .../Shaders/Patreon/VoxelCubed/Includes.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiBasics.cginc | 60 + .../VoxelCubed/Includes/PoiBasics.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiData.cginc | 18 + .../Patreon/VoxelCubed/Includes/PoiData.cginc.meta | 8 + .../VoxelCubed/Includes/PoiDefaultPass.cginc | 20 + .../VoxelCubed/Includes/PoiDefaultPass.cginc.meta | 8 + .../VoxelCubed/Includes/PoiDragNDropLighting.cginc | 100 + .../Includes/PoiDragNDropLighting.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiEmission.cginc | 52 + .../VoxelCubed/Includes/PoiEmission.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiFrag.cginc | 159 + .../Patreon/VoxelCubed/Includes/PoiFrag.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiFun.cginc | 62 + .../Patreon/VoxelCubed/Includes/PoiFun.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiGeom.cginc | 240 + .../Patreon/VoxelCubed/Includes/PoiGeom.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiHelpers.cginc | 42 + .../VoxelCubed/Includes/PoiHelpers.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiLighting.cginc | 124 + .../VoxelCubed/Includes/PoiLighting.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiMacros.cginc | 0 .../VoxelCubed/Includes/PoiMacros.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiMatcap.cginc | 36 + .../VoxelCubed/Includes/PoiMatcap.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiMetal.cginc | 77 + .../VoxelCubed/Includes/PoiMetal.cginc.meta | 8 + .../VoxelCubed/Includes/PoiOutlineFrag.cginc | 26 + .../VoxelCubed/Includes/PoiOutlineFrag.cginc.meta | 8 + .../VoxelCubed/Includes/PoiOutlineIncludes.cginc | 46 + .../Includes/PoiOutlineIncludes.cginc.meta | 8 + .../VoxelCubed/Includes/PoiOutlineVert.cginc | 28 + .../VoxelCubed/Includes/PoiOutlineVert.cginc.meta | 8 + .../VoxelCubed/Includes/PoiPanosphere.cginc | 41 + .../VoxelCubed/Includes/PoiPanosphere.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiPass.cginc | 28 + .../Patreon/VoxelCubed/Includes/PoiPass.cginc.meta | 8 + .../VoxelCubed/Includes/PoiPassOutline.cginc | 18 + .../VoxelCubed/Includes/PoiPassOutline.cginc.meta | 8 + .../VoxelCubed/Includes/PoiPassShadow.cginc | 14 + .../VoxelCubed/Includes/PoiPassShadow.cginc.meta | 8 + .../VoxelCubed/Includes/PoiRefraction.cginc | 49 + .../VoxelCubed/Includes/PoiRefraction.cginc.meta | 8 + .../VoxelCubed/Includes/PoiRimLighting.cginc | 39 + .../VoxelCubed/Includes/PoiRimLighting.cginc.meta | 8 + .../VoxelCubed/Includes/PoiScrollingLayers.cginc | 23 + .../Includes/PoiScrollingLayers.cginc.meta | 8 + .../VoxelCubed/Includes/PoiShadowFrag.cginc | 29 + .../VoxelCubed/Includes/PoiShadowFrag.cginc.meta | 8 + .../VoxelCubed/Includes/PoiShadowIncludes.cginc | 29 + .../Includes/PoiShadowIncludes.cginc.meta | 8 + .../VoxelCubed/Includes/PoiShadowVert.cginc | 11 + .../VoxelCubed/Includes/PoiShadowVert.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiSpecular.cginc | 173 + .../VoxelCubed/Includes/PoiSpecular.cginc.meta | 8 + .../Includes/PoiSubsurfaceScattering.cginc | 30 + .../Includes/PoiSubsurfaceScattering.cginc.meta | 8 + .../VoxelCubed/Includes/PoiTextureBlending.cginc | 33 + .../Includes/PoiTextureBlending.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/PoiVert.cginc | 32 + .../Patreon/VoxelCubed/Includes/PoiVert.cginc.meta | 8 + .../Patreon/VoxelCubed/Includes/Poicludes.cginc | 46 + .../VoxelCubed/Includes/Poicludes.cginc.meta | 8 + .../Shaders/Patreon/VoxelCubed/Shader.meta | 8 + .../Shaders/Patreon/VoxelCubed/Shader/Cubed.mat | 831 + .../Patreon/VoxelCubed/Shader/Cubed.mat.meta | 8 + .../Patreon/VoxelCubed/Shader/PoiyomiCubed.shader | 259 + .../VoxelCubed/Shader/PoiyomiCubed.shader.meta | 27 + .../Assets/_PoiyomiShaders/Shaders/PoiLabels.txt | 298 + .../_PoiyomiShaders/Shaders/PoiLabels.txt.meta | 7 + .../Assets/_PoiyomiShaders/Shaders/Pro.meta | 8 + .../_PoiyomiShaders/Shaders/Pro/Includes.meta | 8 + .../Pro/Includes/CGI_FunctionsArtistic.cginc | 369 + .../Pro/Includes/CGI_FunctionsArtistic.cginc.meta | 9 + .../Pro/Includes/CGI_PoiAlphaToCoverage.cginc | 32 + .../Pro/Includes/CGI_PoiAlphaToCoverage.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiAudioLink.cginc | 128 + .../Pro/Includes/CGI_PoiAudioLink.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiBRDF.cginc | 254 + .../Shaders/Pro/Includes/CGI_PoiBRDF.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiBackFace.cginc | 49 + .../Pro/Includes/CGI_PoiBackFace.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiBlackLight.cginc | 56 + .../Pro/Includes/CGI_PoiBlackLight.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiBlending.cginc | 385 + .../Pro/Includes/CGI_PoiBlending.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiBulge.cginc | 41 + .../Shaders/Pro/Includes/CGI_PoiBulge.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiClearCoat.cginc | 327 + .../Pro/Includes/CGI_PoiClearCoat.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiData.cginc | 260 + .../Shaders/Pro/Includes/CGI_PoiData.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiDebug.cginc | 107 + .../Shaders/Pro/Includes/CGI_PoiDebug.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiDecal.cginc | 331 + .../Shaders/Pro/Includes/CGI_PoiDecal.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiDefines.cginc | 7 + .../Shaders/Pro/Includes/CGI_PoiDefines.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiDepthColor.cginc | 129 + .../Pro/Includes/CGI_PoiDepthColor.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiDissolve.cginc | 237 + .../Pro/Includes/CGI_PoiDissolve.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiDithering.cginc | 34 + .../Pro/Includes/CGI_PoiDithering.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiEmission.cginc | 341 + .../Pro/Includes/CGI_PoiEmission.cginc.meta | 9 + .../Includes/CGI_PoiEnvironmentalRimLighting.cginc | 48 + .../CGI_PoiEnvironmentalRimLighting.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiFlipbook.cginc | 221 + .../Pro/Includes/CGI_PoiFlipbook.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiFrag.cginc | 422 + .../Shaders/Pro/Includes/CGI_PoiFrag.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiGlitter.cginc | 274 + .../Shaders/Pro/Includes/CGI_PoiGlitter.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiGrab.cginc | 125 + .../Shaders/Pro/Includes/CGI_PoiGrab.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiHelpers.cginc | 336 + .../Shaders/Pro/Includes/CGI_PoiHelpers.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiHologram.cginc | 44 + .../Pro/Includes/CGI_PoiHologram.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiIridescence.cginc | 104 + .../Pro/Includes/CGI_PoiIridescence.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiLighting.cginc | 981 + .../Pro/Includes/CGI_PoiLighting.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMSDF.cginc | 243 + .../Shaders/Pro/Includes/CGI_PoiMSDF.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMacros.cginc | 40 + .../Shaders/Pro/Includes/CGI_PoiMacros.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMainTex.cginc | 192 + .../Shaders/Pro/Includes/CGI_PoiMainTex.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMatcap.cginc | 160 + .../Shaders/Pro/Includes/CGI_PoiMatcap.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMath.cginc | 100 + .../Shaders/Pro/Includes/CGI_PoiMath.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMetal.cginc | 130 + .../Shaders/Pro/Includes/CGI_PoiMetal.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiMirror.cginc | 81 + .../Shaders/Pro/Includes/CGI_PoiMirror.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiOutlineFrag.cginc | 117 + .../Pro/Includes/CGI_PoiOutlineFrag.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiOutlineVert.cginc | 144 + .../Pro/Includes/CGI_PoiOutlineVert.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPanosphere.cginc | 80 + .../Pro/Includes/CGI_PoiPanosphere.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiParallax.cginc | 166 + .../Pro/Includes/CGI_PoiParallax.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPass.cginc | 252 + .../Shaders/Pro/Includes/CGI_PoiPass.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPassOutline.cginc | 34 + .../Pro/Includes/CGI_PoiPassOutline.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPassShadow.cginc | 46 + .../Pro/Includes/CGI_PoiPassShadow.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPathing.cginc | 150 + .../Shaders/Pro/Includes/CGI_PoiPathing.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiPenetration.cginc | 214 + .../Pro/Includes/CGI_PoiPenetration.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiRGBMask.cginc | 191 + .../Shaders/Pro/Includes/CGI_PoiRGBMask.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiRandom.cginc | 41 + .../Shaders/Pro/Includes/CGI_PoiRandom.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiRimLighting.cginc | 99 + .../Pro/Includes/CGI_PoiRimLighting.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiShadowFrag.cginc | 143 + .../Pro/Includes/CGI_PoiShadowFrag.cginc.meta | 9 + .../Pro/Includes/CGI_PoiShadowIncludes.cginc | 44 + .../Pro/Includes/CGI_PoiShadowIncludes.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiShadowVert.cginc | 86 + .../Pro/Includes/CGI_PoiShadowVert.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiSpawnInFrag.cginc | 58 + .../Pro/Includes/CGI_PoiSpawnInFrag.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiSpawnInVert.cginc | 40 + .../Pro/Includes/CGI_PoiSpawnInVert.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiSpecular.cginc | 505 + .../Pro/Includes/CGI_PoiSpecular.cginc.meta | 9 + .../Pro/Includes/CGI_PoiSubsurfaceScattering.cginc | 75 + .../CGI_PoiSubsurfaceScattering.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiTessellation.cginc | 117 + .../Pro/Includes/CGI_PoiTessellation.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiUVDistortion.cginc | 74 + .../Pro/Includes/CGI_PoiUVDistortion.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_PoiV2F.cginc | 35 + .../Shaders/Pro/Includes/CGI_PoiV2F.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiVert.cginc | 145 + .../Shaders/Pro/Includes/CGI_PoiVert.cginc.meta | 9 + .../Pro/Includes/CGI_PoiVertexManipulations.cginc | 102 + .../Includes/CGI_PoiVertexManipulations.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiVideo.cginc | 297 + .../Shaders/Pro/Includes/CGI_PoiVideo.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiVoronoi.cginc | 312 + .../Shaders/Pro/Includes/CGI_PoiVoronoi.cginc.meta | 9 + .../Shaders/Pro/Includes/CGI_PoiWireframe.cginc | 111 + .../Pro/Includes/CGI_PoiWireframe.cginc.meta | 8 + .../Shaders/Pro/Includes/CGI_Poicludes.cginc | 172 + .../Shaders/Pro/Includes/CGI_Poicludes.cginc.meta | 9 + .../_PoiyomiShaders/Shaders/Pro/Includes/Notes.txt | 7 + .../Shaders/Pro/Includes/Notes.txt.meta | 7 + .../_PoiyomiShaders/Shaders/Pro/Shaders.meta | 8 + .../Shaders/Pro/Shaders/7PlusLabels.txt | 233 + .../Shaders/Pro/Shaders/7PlusLabels.txt.meta | 7 + .../Shaders/Pro/Shaders/PatchNotes.poi | 21 + .../Shaders/Pro/Shaders/PatchNotes.poi.meta | 7 + .../Shaders/Pro/Shaders/S_Poiyomi_Pro.shader | 1996 ++ .../Shaders/Pro/Shaders/S_Poiyomi_Pro.shader.meta | 111 + .../Pro/Shaders/S_Poiyomi_Pro_GrabPass.shader | 2021 ++ .../Pro/Shaders/S_Poiyomi_Pro_GrabPass.shader.meta | 9 + .../Shaders/Pro/Shaders/S_Poiyomi_Toon.shader | 1838 ++ .../Shaders/Pro/Shaders/S_Poiyomi_Toon.shader.meta | 103 + .../Assets/_PoiyomiShaders/Textures.meta | 8 + .../Assets/_PoiyomiShaders/Textures/Cubemaps.meta | 8 + .../Textures/Cubemaps/T_Clouds_CM.jpg | Bin 0 -> 157202 bytes .../Textures/Cubemaps/T_Clouds_CM.jpg.meta | 107 + .../Textures/Cubemaps/T_Gold_CM.png | Bin 0 -> 226331 bytes .../Textures/Cubemaps/T_Gold_CM.png.meta | 100 + .../Textures/Cubemaps/T_Shine_CM.png | Bin 0 -> 59816 bytes .../Textures/Cubemaps/T_Shine_CM.png.meta | 87 + .../Textures/Cubemaps/T_ToonLit_CM.psd | Bin 0 -> 32503 bytes .../Textures/Cubemaps/T_ToonLit_CM.psd.meta | 87 + .../Textures/Cubemaps/T_iridescent_CM.png | Bin 0 -> 471646 bytes .../Textures/Cubemaps/T_iridescent_CM.png.meta | 100 + .../Assets/_PoiyomiShaders/Textures/Debug.meta | 8 + .../Textures/Debug/T_SecretMessage.png | Bin 0 -> 3942 bytes .../Textures/Debug/T_SecretMessage.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Defaults.meta | 8 + .../Textures/Defaults/T_Default_CM.exr | Bin 0 -> 164430 bytes .../Textures/Defaults/T_Default_CM.exr.meta | 100 + .../Textures/Defaults/T_Default_SR.png | Bin 0 -> 1501 bytes .../Textures/Defaults/T_Default_SR.png.meta | 99 + .../Textures/Defaults/T_MainTex_D.png | Bin 0 -> 932 bytes .../Textures/Defaults/T_MainTex_D.png.meta | 104 + .../Assets/_PoiyomiShaders/Textures/Detail.meta | 8 + .../_PoiyomiShaders/Textures/Detail/T_Cracks_D.jpg | Bin 0 -> 58580 bytes .../Textures/Detail/T_Cracks_D.jpg.meta | 99 + .../Textures/DiscordBannerTrans.png | Bin 0 -> 449473 bytes .../Textures/DiscordBannerTrans.png.meta | 92 + .../_PoiyomiShaders/Textures/Distortion.meta | 8 + .../Textures/Distortion/T_DistortionMap0_DM.png | Bin 0 -> 50593 bytes .../Distortion/T_DistortionMap0_DM.png.meta | 99 + .../Textures/Distortion/T_DistortionMap1_DM.png | Bin 0 -> 167325 bytes .../Distortion/T_DistortionMap1_DM.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Fonts.meta | 8 + .../Textures/Fonts/T_DigitalBold_FONT.png | Bin 0 -> 123496 bytes .../Textures/Fonts/T_DigitalBold_FONT.png.meta | 86 + .../Textures/Fonts/T_RobotoBlack_FONT.png | Bin 0 -> 246546 bytes .../Textures/Fonts/T_RobotoBlack_FONT.png.meta | 86 + .../Textures/Fonts/T_RobotoMedium_FONT.png | Bin 0 -> 246010 bytes .../Textures/Fonts/T_RobotoMedium_FONT.png.meta | 86 + .../Textures/Fonts/T_RobotoRegular_FONT.png | Bin 0 -> 240175 bytes .../Textures/Fonts/T_RobotoRegular_FONT.png.meta | 86 + .../Assets/_PoiyomiShaders/Textures/Fur.meta | 8 + .../_PoiyomiShaders/Textures/Fur/Fur (1).jpg | Bin 0 -> 40738 bytes .../_PoiyomiShaders/Textures/Fur/Fur (1).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (1).png | Bin 0 -> 234055 bytes .../_PoiyomiShaders/Textures/Fur/Fur (1).png.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (10).jpg | Bin 0 -> 1180516 bytes .../_PoiyomiShaders/Textures/Fur/Fur (10).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (11).jpg | Bin 0 -> 705064 bytes .../_PoiyomiShaders/Textures/Fur/Fur (11).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (12).jpg | Bin 0 -> 1392092 bytes .../_PoiyomiShaders/Textures/Fur/Fur (12).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (13).jpg | Bin 0 -> 872212 bytes .../_PoiyomiShaders/Textures/Fur/Fur (13).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (14).jpg | Bin 0 -> 759977 bytes .../_PoiyomiShaders/Textures/Fur/Fur (14).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (15).jpg | Bin 0 -> 1159598 bytes .../_PoiyomiShaders/Textures/Fur/Fur (15).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (16).jpg | Bin 0 -> 992906 bytes .../_PoiyomiShaders/Textures/Fur/Fur (16).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (17).jpg | Bin 0 -> 898439 bytes .../_PoiyomiShaders/Textures/Fur/Fur (17).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (18).jpg | Bin 0 -> 159744 bytes .../_PoiyomiShaders/Textures/Fur/Fur (18).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (19).jpg | Bin 0 -> 159744 bytes .../_PoiyomiShaders/Textures/Fur/Fur (19).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (2).jpg | Bin 0 -> 54403 bytes .../_PoiyomiShaders/Textures/Fur/Fur (2).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (2).png | Bin 0 -> 668851 bytes .../_PoiyomiShaders/Textures/Fur/Fur (2).png.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (21).jpg | Bin 0 -> 12865 bytes .../_PoiyomiShaders/Textures/Fur/Fur (21).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (22).jpg | Bin 0 -> 143360 bytes .../_PoiyomiShaders/Textures/Fur/Fur (22).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (23).jpg | Bin 0 -> 12762 bytes .../_PoiyomiShaders/Textures/Fur/Fur (23).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (24).jpg | Bin 0 -> 285854 bytes .../_PoiyomiShaders/Textures/Fur/Fur (24).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (3).jpg | Bin 0 -> 1174332 bytes .../_PoiyomiShaders/Textures/Fur/Fur (3).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (4).jpg | Bin 0 -> 1279171 bytes .../_PoiyomiShaders/Textures/Fur/Fur (4).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (4).png | Bin 0 -> 224916 bytes .../_PoiyomiShaders/Textures/Fur/Fur (4).png.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (5).jpg | Bin 0 -> 1190268 bytes .../_PoiyomiShaders/Textures/Fur/Fur (5).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (6).jpg | Bin 0 -> 598571 bytes .../_PoiyomiShaders/Textures/Fur/Fur (6).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (7).jpg | Bin 0 -> 1316187 bytes .../_PoiyomiShaders/Textures/Fur/Fur (7).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (8).jpg | Bin 0 -> 1245897 bytes .../_PoiyomiShaders/Textures/Fur/Fur (8).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/Fur (9).jpg | Bin 0 -> 965735 bytes .../_PoiyomiShaders/Textures/Fur/Fur (9).jpg.meta | 99 + .../_PoiyomiShaders/Textures/Fur/FurHeightMap.gif | Bin 0 -> 29993 bytes .../Textures/Fur/FurHeightMap.gif.meta | 99 + .../_PoiyomiShaders/Textures/Fur/noise_simplex.png | Bin 0 -> 1952368 bytes .../Textures/Fur/noise_simplex.png.meta | 99 + .../Textures/Fur/ornage-fur-texture.jpg | Bin 0 -> 1366852 bytes .../Textures/Fur/ornage-fur-texture.jpg.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Gifs.meta | 8 + .../Textures/Gifs/T_2ColorLines_GIF.gif | Bin 0 -> 21918 bytes .../Textures/Gifs/T_2ColorLines_GIF.gif.meta | 76 + .../Textures/Gifs/T_3ColorLines_GIF.gif | Bin 0 -> 45264 bytes .../Textures/Gifs/T_3ColorLines_GIF.gif.meta | 76 + .../Textures/Gifs/T_FireWorks_GIF.gif | Bin 0 -> 77414 bytes .../Textures/Gifs/T_FireWorks_GIF.gif.meta | 76 + .../Textures/Gifs/T_GrayThing_GIF.gif | Bin 0 -> 40514 bytes .../Textures/Gifs/T_GrayThing_GIF.gif.meta | 76 + .../_PoiyomiShaders/Textures/Gifs/T_Hearts_GIF.gif | Bin 0 -> 49764 bytes .../Textures/Gifs/T_Hearts_GIF.gif.meta | 76 + .../Textures/Gifs/T_HorizontalCircles_GIF.gif | Bin 0 -> 38929 bytes .../Textures/Gifs/T_HorizontalCircles_GIF.gif.meta | 76 + .../_PoiyomiShaders/Textures/Gifs/T_Matrix_GIF.gif | Bin 0 -> 98330 bytes .../Textures/Gifs/T_Matrix_GIF.gif.meta | 76 + .../_PoiyomiShaders/Textures/Gifs/T_Ovals_GIF.gif | Bin 0 -> 66968 bytes .../Textures/Gifs/T_Ovals_GIF.gif.meta | 76 + .../_PoiyomiShaders/Textures/Gifs/T_Snakes_GIF.gif | Bin 0 -> 145174 bytes .../Textures/Gifs/T_Snakes_GIF.gif.meta | 99 + .../Textures/Gifs/VerticalCircles.gif | Bin 0 -> 38279 bytes .../Textures/Gifs/VerticalCircles.gif.meta | 76 + .../Assets/_PoiyomiShaders/Textures/Gifs/Waves.gif | Bin 0 -> 137306 bytes .../_PoiyomiShaders/Textures/Gifs/Waves.gif.meta | 76 + .../_PoiyomiShaders/Textures/Gifs/zigzags.gif | Bin 0 -> 40240 bytes .../_PoiyomiShaders/Textures/Gifs/zigzags.gif.meta | 76 + .../Assets/_PoiyomiShaders/Textures/LUTs.meta | 8 + .../Textures/LUTs/dfg-multiscatter-cloth.exr | Bin 0 -> 47850 bytes .../Textures/LUTs/dfg-multiscatter-cloth.exr.meta | 116 + .../Assets/_PoiyomiShaders/Textures/Masks.meta | 8 + .../_PoiyomiShaders/Textures/Masks/T_Grid_MBW.png | Bin 0 -> 524799 bytes .../Textures/Masks/T_Grid_MBW.png.meta | 99 + .../_PoiyomiShaders/Textures/Masks/T_RGBA_Mask.tif | Bin 0 -> 1067892 bytes .../Textures/Masks/T_RGBA_Mask.tif.meta | 99 + .../Textures/Masks/T_Star_MBW 1.png | Bin 0 -> 15847 bytes .../Textures/Masks/T_Star_MBW 1.png.meta | 92 + .../_PoiyomiShaders/Textures/Masks/T_Star_MBW.jpg | Bin 0 -> 7879 bytes .../Textures/Masks/T_Star_MBW.jpg.meta | 104 + .../_PoiyomiShaders/Textures/Masks/T_Star_MBW.png | Bin 0 -> 15811 bytes .../Textures/Masks/T_Star_MBW.png.meta | 92 + .../Textures/Masks/T_circuit_MBW.png | Bin 0 -> 29516 bytes .../Textures/Masks/T_circuit_MBW.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Matcaps.meta | 8 + .../Textures/Matcaps/LatexMatcap2.png | Bin 0 -> 209081 bytes .../Textures/Matcaps/LatexMatcap2.png.meta | 99 + .../Textures/Matcaps/MatcapLatex.png | Bin 0 -> 207100 bytes .../Textures/Matcaps/MatcapLatex.png.meta | 99 + .../_PoiyomiShaders/Textures/Matcaps/T_Matcap.png | Bin 0 -> 160058 bytes .../Textures/Matcaps/T_Matcap.png.meta | 99 + .../Textures/Matcaps/T_MatcapPinkBlue_MC.png | Bin 0 -> 17789 bytes .../Textures/Matcaps/T_MatcapPinkBlue_MC.png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (1).bmp | Bin 0 -> 196664 bytes .../Textures/Matcaps/T_Matcap_MC (1).bmp.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (1).jpg | Bin 0 -> 126976 bytes .../Textures/Matcaps/T_Matcap_MC (1).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (1).png | Bin 0 -> 20647 bytes .../Textures/Matcaps/T_Matcap_MC (1).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (10).jpg | Bin 0 -> 50635 bytes .../Textures/Matcaps/T_Matcap_MC (10).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (10).png | Bin 0 -> 30512 bytes .../Textures/Matcaps/T_Matcap_MC (10).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (11).jpg | Bin 0 -> 62886 bytes .../Textures/Matcaps/T_Matcap_MC (11).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (11).png | Bin 0 -> 40345 bytes .../Textures/Matcaps/T_Matcap_MC (11).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (12).jpg | Bin 0 -> 7547 bytes .../Textures/Matcaps/T_Matcap_MC (12).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (12).png | Bin 0 -> 17564 bytes .../Textures/Matcaps/T_Matcap_MC (12).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (13).jpg | Bin 0 -> 4620 bytes .../Textures/Matcaps/T_Matcap_MC (13).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (13).png | Bin 0 -> 18652 bytes .../Textures/Matcaps/T_Matcap_MC (13).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (14).jpg | Bin 0 -> 39384 bytes .../Textures/Matcaps/T_Matcap_MC (14).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (14).png | Bin 0 -> 85342 bytes .../Textures/Matcaps/T_Matcap_MC (14).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (15).jpg | Bin 0 -> 31326 bytes .../Textures/Matcaps/T_Matcap_MC (15).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (15).png | Bin 0 -> 54600 bytes .../Textures/Matcaps/T_Matcap_MC (15).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (16).jpg | Bin 0 -> 51671 bytes .../Textures/Matcaps/T_Matcap_MC (16).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (16).png | Bin 0 -> 18771 bytes .../Textures/Matcaps/T_Matcap_MC (16).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (17).jpg | Bin 0 -> 11578 bytes .../Textures/Matcaps/T_Matcap_MC (17).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (17).png | Bin 0 -> 36841 bytes .../Textures/Matcaps/T_Matcap_MC (17).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (18).jpg | Bin 0 -> 61440 bytes .../Textures/Matcaps/T_Matcap_MC (18).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (18).png | Bin 0 -> 23116 bytes .../Textures/Matcaps/T_Matcap_MC (18).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (19).jpg | Bin 0 -> 4646 bytes .../Textures/Matcaps/T_Matcap_MC (19).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (19).png | Bin 0 -> 8172 bytes .../Textures/Matcaps/T_Matcap_MC (19).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (2).jpg | Bin 0 -> 209184 bytes .../Textures/Matcaps/T_Matcap_MC (2).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (2).png | Bin 0 -> 620692 bytes .../Textures/Matcaps/T_Matcap_MC (2).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (20).jpg | Bin 0 -> 51977 bytes .../Textures/Matcaps/T_Matcap_MC (20).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (20).png | Bin 0 -> 10961 bytes .../Textures/Matcaps/T_Matcap_MC (20).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (21).jpg | Bin 0 -> 24873 bytes .../Textures/Matcaps/T_Matcap_MC (21).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (21).png | Bin 0 -> 18270 bytes .../Textures/Matcaps/T_Matcap_MC (21).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (22).jpg | Bin 0 -> 36308 bytes .../Textures/Matcaps/T_Matcap_MC (22).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (22).png | Bin 0 -> 17467 bytes .../Textures/Matcaps/T_Matcap_MC (22).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (23).jpg | Bin 0 -> 82097 bytes .../Textures/Matcaps/T_Matcap_MC (23).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (23).png | Bin 0 -> 32567 bytes .../Textures/Matcaps/T_Matcap_MC (23).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (24).jpg | Bin 0 -> 77486 bytes .../Textures/Matcaps/T_Matcap_MC (24).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (24).png | Bin 0 -> 33533 bytes .../Textures/Matcaps/T_Matcap_MC (24).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (25).jpg | Bin 0 -> 69969 bytes .../Textures/Matcaps/T_Matcap_MC (25).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (25).png | Bin 0 -> 14444 bytes .../Textures/Matcaps/T_Matcap_MC (25).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (26).jpg | Bin 0 -> 70349 bytes .../Textures/Matcaps/T_Matcap_MC (26).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (26).png | Bin 0 -> 55953 bytes .../Textures/Matcaps/T_Matcap_MC (26).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (27).jpg | Bin 0 -> 83221 bytes .../Textures/Matcaps/T_Matcap_MC (27).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (27).png | Bin 0 -> 50451 bytes .../Textures/Matcaps/T_Matcap_MC (27).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (28).jpg | Bin 0 -> 64028 bytes .../Textures/Matcaps/T_Matcap_MC (28).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (28).png | Bin 0 -> 30945 bytes .../Textures/Matcaps/T_Matcap_MC (28).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (29).jpg | Bin 0 -> 69044 bytes .../Textures/Matcaps/T_Matcap_MC (29).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (29).png | Bin 0 -> 50568 bytes .../Textures/Matcaps/T_Matcap_MC (29).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (3).jpg | Bin 0 -> 9576 bytes .../Textures/Matcaps/T_Matcap_MC (3).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (3).png | Bin 0 -> 94255 bytes .../Textures/Matcaps/T_Matcap_MC (3).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (30).jpg | Bin 0 -> 7378 bytes .../Textures/Matcaps/T_Matcap_MC (30).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (30).png | Bin 0 -> 29542 bytes .../Textures/Matcaps/T_Matcap_MC (30).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (31).jpg | Bin 0 -> 14409 bytes .../Textures/Matcaps/T_Matcap_MC (31).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (31).png | Bin 0 -> 49733 bytes .../Textures/Matcaps/T_Matcap_MC (31).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (32).jpg | Bin 0 -> 12759 bytes .../Textures/Matcaps/T_Matcap_MC (32).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (32).png | Bin 0 -> 33806 bytes .../Textures/Matcaps/T_Matcap_MC (32).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (33).jpg | Bin 0 -> 163403 bytes .../Textures/Matcaps/T_Matcap_MC (33).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (33).png | Bin 0 -> 27549 bytes .../Textures/Matcaps/T_Matcap_MC (33).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (34).png | Bin 0 -> 33476 bytes .../Textures/Matcaps/T_Matcap_MC (34).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (35).png | Bin 0 -> 42399 bytes .../Textures/Matcaps/T_Matcap_MC (35).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (36).png | Bin 0 -> 44078 bytes .../Textures/Matcaps/T_Matcap_MC (36).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (37).png | Bin 0 -> 33518 bytes .../Textures/Matcaps/T_Matcap_MC (37).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (38).png | Bin 0 -> 20976 bytes .../Textures/Matcaps/T_Matcap_MC (38).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (39).png | Bin 0 -> 57720 bytes .../Textures/Matcaps/T_Matcap_MC (39).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (4).jpg | Bin 0 -> 5178 bytes .../Textures/Matcaps/T_Matcap_MC (4).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (4).png | Bin 0 -> 137036 bytes .../Textures/Matcaps/T_Matcap_MC (4).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (40).png | Bin 0 -> 50363 bytes .../Textures/Matcaps/T_Matcap_MC (40).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (41).png | Bin 0 -> 184552 bytes .../Textures/Matcaps/T_Matcap_MC (41).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (42).png | Bin 0 -> 79483 bytes .../Textures/Matcaps/T_Matcap_MC (42).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (43).png | Bin 0 -> 20968 bytes .../Textures/Matcaps/T_Matcap_MC (43).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (44).png | Bin 0 -> 17879 bytes .../Textures/Matcaps/T_Matcap_MC (44).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (45).png | Bin 0 -> 20725 bytes .../Textures/Matcaps/T_Matcap_MC (45).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (46).png | Bin 0 -> 22533 bytes .../Textures/Matcaps/T_Matcap_MC (46).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (47).png | Bin 0 -> 354815 bytes .../Textures/Matcaps/T_Matcap_MC (47).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (5).jpg | Bin 0 -> 3987 bytes .../Textures/Matcaps/T_Matcap_MC (5).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (5).png | Bin 0 -> 206047 bytes .../Textures/Matcaps/T_Matcap_MC (5).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (6).jpg | Bin 0 -> 7429 bytes .../Textures/Matcaps/T_Matcap_MC (6).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (6).png | Bin 0 -> 95531 bytes .../Textures/Matcaps/T_Matcap_MC (6).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (7).jpg | Bin 0 -> 4615 bytes .../Textures/Matcaps/T_Matcap_MC (7).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (7).png | Bin 0 -> 11441 bytes .../Textures/Matcaps/T_Matcap_MC (7).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (8).jpg | Bin 0 -> 6171 bytes .../Textures/Matcaps/T_Matcap_MC (8).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (8).png | Bin 0 -> 104742 bytes .../Textures/Matcaps/T_Matcap_MC (8).png.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (9).jpg | Bin 0 -> 10320 bytes .../Textures/Matcaps/T_Matcap_MC (9).jpg.meta | 99 + .../Textures/Matcaps/T_Matcap_MC (9).png | Bin 0 -> 144149 bytes .../Textures/Matcaps/T_Matcap_MC (9).png.meta | 99 + .../Textures/Matcaps/T_Rainbow_Matcap.png | Bin 0 -> 132810 bytes .../Textures/Matcaps/T_Rainbow_Matcap.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Misc.meta | 8 + .../_PoiyomiShaders/Textures/Misc/T_Black.png | Bin 0 -> 217 bytes .../_PoiyomiShaders/Textures/Misc/T_Black.png.meta | 99 + .../_PoiyomiShaders/Textures/Misc/T_Circle.png | Bin 0 -> 19672 bytes .../Textures/Misc/T_Circle.png.meta | 104 + .../Textures/Misc/T_LightRainbowVertical.png | Bin 0 -> 4797 bytes .../Textures/Misc/T_LightRainbowVertical.png.meta | 99 + .../Textures/Misc/T_PastelRainbowVertical.png | Bin 0 -> 122814 bytes .../Textures/Misc/T_PastelRainbowVertical.png.meta | 99 + .../Textures/Misc/T_RainbowHorizontal.png | Bin 0 -> 4433 bytes .../Textures/Misc/T_RainbowHorizontal.png.meta | 99 + .../Textures/Misc/T_RainbowVertical.png | Bin 0 -> 7773 bytes .../Textures/Misc/T_RainbowVertical.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Noise.meta | 8 + .../_PoiyomiShaders/Textures/Noise/Gradient.jpg | Bin 0 -> 32405 bytes .../Textures/Noise/Gradient.jpg.meta | 99 + .../_PoiyomiShaders/Textures/Noise/Gradient2.jpg | Bin 0 -> 47175 bytes .../Textures/Noise/Gradient2.jpg.meta | 99 + .../Textures/Noise/T_Abstract2_Noise.png | Bin 0 -> 435922 bytes .../Textures/Noise/T_Abstract2_Noise.png.meta | 99 + .../Textures/Noise/T_Abstract_Noise.png | Bin 0 -> 651330 bytes .../Textures/Noise/T_Abstract_Noise.png.meta | 99 + .../Textures/Noise/T_Blotch_Noise.png | Bin 0 -> 434948 bytes .../Textures/Noise/T_Blotch_Noise.png.meta | 99 + .../Textures/Noise/T_Brick2_Noise.png | Bin 0 -> 75242 bytes .../Textures/Noise/T_Brick2_Noise.png.meta | 99 + .../Textures/Noise/T_Brick_Noise.png | Bin 0 -> 171557 bytes .../Textures/Noise/T_Brick_Noise.png.meta | 99 + .../Textures/Noise/T_Caustic_Noise.png | Bin 0 -> 74912 bytes .../Textures/Noise/T_Caustic_Noise.png.meta | 99 + .../Textures/Noise/T_Cell_Noise.png | Bin 0 -> 668465 bytes .../Textures/Noise/T_Cell_Noise.png.meta | 99 + .../Textures/Noise/T_Checker_Noise.png | Bin 0 -> 6315 bytes .../Textures/Noise/T_Checker_Noise.png.meta | 99 + .../Textures/Noise/T_Cloudy_Noise.png | Bin 0 -> 525913 bytes .../Textures/Noise/T_Cloudy_Noise.png.meta | 99 + .../Textures/Noise/T_InvertedHex_Noise.png | Bin 0 -> 72366 bytes .../Textures/Noise/T_InvertedHex_Noise.png.meta | 104 + .../Textures/Noise/T_Noise_No (1).jpg | Bin 0 -> 63782 bytes .../Textures/Noise/T_Noise_No (1).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (1).png | Bin 0 -> 313641 bytes .../Textures/Noise/T_Noise_No (1).png.meta | 99 + .../Textures/Noise/T_Noise_No (10).jpg | Bin 0 -> 49513 bytes .../Textures/Noise/T_Noise_No (10).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (11).jpg | Bin 0 -> 110704 bytes .../Textures/Noise/T_Noise_No (11).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (12).TGA | Bin 0 -> 196652 bytes .../Textures/Noise/T_Noise_No (12).TGA.meta | 99 + .../Textures/Noise/T_Noise_No (12).jpg | Bin 0 -> 49513 bytes .../Textures/Noise/T_Noise_No (12).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (13).TGA | Bin 0 -> 786476 bytes .../Textures/Noise/T_Noise_No (13).TGA.meta | 99 + .../Textures/Noise/T_Noise_No (13).jpg | Bin 0 -> 132973 bytes .../Textures/Noise/T_Noise_No (13).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (14).jpg | Bin 0 -> 88362 bytes .../Textures/Noise/T_Noise_No (14).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (15).jpg | Bin 0 -> 121532 bytes .../Textures/Noise/T_Noise_No (15).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (16).TGA | Bin 0 -> 196652 bytes .../Textures/Noise/T_Noise_No (16).TGA.meta | 99 + .../Textures/Noise/T_Noise_No (16).jpg | Bin 0 -> 46825 bytes .../Textures/Noise/T_Noise_No (16).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (17).jpg | Bin 0 -> 39826 bytes .../Textures/Noise/T_Noise_No (17).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (18).jpg | Bin 0 -> 41453 bytes .../Textures/Noise/T_Noise_No (18).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (19).jpg | Bin 0 -> 22298 bytes .../Textures/Noise/T_Noise_No (19).jpg.meta | 104 + .../Textures/Noise/T_Noise_No (2).jpg | Bin 0 -> 302212 bytes .../Textures/Noise/T_Noise_No (2).jpg.meta | 104 + .../Textures/Noise/T_Noise_No (2).png | Bin 0 -> 591996 bytes .../Textures/Noise/T_Noise_No (2).png.meta | 99 + .../Textures/Noise/T_Noise_No (20).jpg | Bin 0 -> 63574 bytes .../Textures/Noise/T_Noise_No (20).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (21).jpg | Bin 0 -> 158026 bytes .../Textures/Noise/T_Noise_No (21).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (22).jpg | Bin 0 -> 68234 bytes .../Textures/Noise/T_Noise_No (22).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (23).jpg | Bin 0 -> 240062 bytes .../Textures/Noise/T_Noise_No (23).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (3).jpg | Bin 0 -> 336401 bytes .../Textures/Noise/T_Noise_No (3).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (4).jpg | Bin 0 -> 186699 bytes .../Textures/Noise/T_Noise_No (4).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (5).jpg | Bin 0 -> 83667 bytes .../Textures/Noise/T_Noise_No (5).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (6).jpg | Bin 0 -> 26095 bytes .../Textures/Noise/T_Noise_No (6).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (7).jpg | Bin 0 -> 96719 bytes .../Textures/Noise/T_Noise_No (7).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (8).jpg | Bin 0 -> 85356 bytes .../Textures/Noise/T_Noise_No (8).jpg.meta | 99 + .../Textures/Noise/T_Noise_No (9).TGA | Bin 0 -> 196652 bytes .../Textures/Noise/T_Noise_No (9).TGA.meta | 99 + .../Textures/Noise/T_Noise_No (9).jpg | Bin 0 -> 200808 bytes .../Textures/Noise/T_Noise_No (9).jpg.meta | 99 + .../Textures/Noise/T_Noise_No.png (1).png | Bin 0 -> 164725 bytes .../Textures/Noise/T_Noise_No.png (1).png.meta | 104 + .../Textures/Noise/T_Noise_No.png (10).png | Bin 0 -> 516749 bytes .../Textures/Noise/T_Noise_No.png (10).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (11).png | Bin 0 -> 37132 bytes .../Textures/Noise/T_Noise_No.png (11).png.meta | 104 + .../Textures/Noise/T_Noise_No.png (12).png | Bin 0 -> 184376 bytes .../Textures/Noise/T_Noise_No.png (12).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (13).png | Bin 0 -> 42189 bytes .../Textures/Noise/T_Noise_No.png (13).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (14).png | Bin 0 -> 258933 bytes .../Textures/Noise/T_Noise_No.png (14).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (15).png | Bin 0 -> 1101260 bytes .../Textures/Noise/T_Noise_No.png (15).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (16).png | Bin 0 -> 979171 bytes .../Textures/Noise/T_Noise_No.png (16).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (17).png | Bin 0 -> 1110184 bytes .../Textures/Noise/T_Noise_No.png (17).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (18).png | Bin 0 -> 1135897 bytes .../Textures/Noise/T_Noise_No.png (18).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (2).png | Bin 0 -> 161520 bytes .../Textures/Noise/T_Noise_No.png (2).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (3).png | Bin 0 -> 159026 bytes .../Textures/Noise/T_Noise_No.png (3).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (4).png | Bin 0 -> 185404 bytes .../Textures/Noise/T_Noise_No.png (4).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (5).png | Bin 0 -> 285056 bytes .../Textures/Noise/T_Noise_No.png (5).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (6).png | Bin 0 -> 107471 bytes .../Textures/Noise/T_Noise_No.png (6).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (7).png | Bin 0 -> 80204 bytes .../Textures/Noise/T_Noise_No.png (7).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (8).png | Bin 0 -> 93199 bytes .../Textures/Noise/T_Noise_No.png (8).png.meta | 99 + .../Textures/Noise/T_Noise_No.png (9).png | Bin 0 -> 287104 bytes .../Textures/Noise/T_Noise_No.png (9).png.meta | 99 + .../Textures/Noise/T_Pattern2_Noise.jpg | Bin 0 -> 57238 bytes .../Textures/Noise/T_Pattern2_Noise.jpg.meta | 99 + .../Textures/Noise/T_Pattern_Noise.jpg | Bin 0 -> 28615 bytes .../Textures/Noise/T_Pattern_Noise.jpg.meta | 99 + .../Textures/Noise/T_Sketch_Noise.png | Bin 0 -> 988426 bytes .../Textures/Noise/T_Sketch_Noise.png.meta | 99 + .../Textures/Noise/T_Smudge_Noise.png | Bin 0 -> 336016 bytes .../Textures/Noise/T_Smudge_Noise.png.meta | 99 + .../Textures/Noise/T_Vornoi2_Noise.png | Bin 0 -> 235210 bytes .../Textures/Noise/T_Vornoi2_Noise.png.meta | 99 + .../Textures/Noise/T_Voronoi_Noise.png | Bin 0 -> 155653 bytes .../Textures/Noise/T_Voronoi_Noise.png.meta | 99 + .../Textures/Noise/T_Wiggly_Noise.png | Bin 0 -> 237535 bytes .../Textures/Noise/T_Wiggly_Noise.png.meta | 99 + .../Textures/Noise/T_ZigZag_Noise.png | Bin 0 -> 247337 bytes .../Textures/Noise/T_ZigZag_Noise.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Path.meta | 8 + .../Textures/Path/T_PathMap_Color.png | Bin 0 -> 391213 bytes .../Textures/Path/T_PathMap_Color.png.meta | 99 + .../Textures/Path/T_PathMap_RGB.png | Bin 0 -> 72411 bytes .../Textures/Path/T_PathMap_RGB.png.meta | 99 + .../Textures/Path/T_WigglePath_RGB.tga | Bin 0 -> 24571164 bytes .../Textures/Path/T_WigglePath_RGB.tga.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Ramps.meta | 8 + .../_PoiyomiShaders/Textures/Ramps/SkinLUT.png | Bin 0 -> 40948 bytes .../Textures/Ramps/SkinLUT.png.meta | 99 + .../_PoiyomiShaders/Textures/Ramps/T_Hair_SR.tga | Bin 0 -> 1068 bytes .../Textures/Ramps/T_Hair_SR.tga.meta | 99 + .../_PoiyomiShaders/Textures/Ramps/T_Metal_SR.png | Bin 0 -> 1817 bytes .../Textures/Ramps/T_Metal_SR.png.meta | 99 + .../_PoiyomiShaders/Textures/Ramps/T_Miami.png | Bin 0 -> 847 bytes .../Textures/Ramps/T_Miami.png.meta | 88 + .../Textures/Ramps/T_Mihoyo_MCSR.tga | Bin 0 -> 750044 bytes .../Textures/Ramps/T_Mihoyo_MCSR.tga.meta | 99 + .../Textures/Ramps/T_Neitri_skin_SR.png | Bin 0 -> 277 bytes .../Textures/Ramps/T_Neitri_skin_SR.png.meta | 99 + .../_PoiyomiShaders/Textures/Ramps/T_Skin_SR.tga | Bin 0 -> 1068 bytes .../Textures/Ramps/T_Skin_SR.tga.meta | 99 + .../Textures/Ramps/T_SoftHardBlack_SR.png | Bin 0 -> 2910 bytes .../Textures/Ramps/T_SoftHardBlack_SR.png.meta | 99 + .../Textures/Ramps/T_SoftHardGrey_SR.png | Bin 0 -> 2908 bytes .../Textures/Ramps/T_SoftHardGrey_SR.png.meta | 99 + .../Textures/Ramps/T_ToonSkin_SR.png | Bin 0 -> 4211 bytes .../Textures/Ramps/T_ToonSkin_SR.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/Shapes.meta | 8 + .../_PoiyomiShaders/Textures/Shapes/Normals.meta | 8 + .../Textures/Shapes/Normals/T_Cloth_N.jpg | Bin 0 -> 34369 bytes .../Textures/Shapes/Normals/T_Cloth_N.jpg.meta | 99 + .../Textures/Shapes/Normals/T_Fabric_N.jpg | Bin 0 -> 487089 bytes .../Textures/Shapes/Normals/T_Fabric_N.jpg.meta | 99 + .../Textures/Shapes/Normals/T_Random_N.jpg | Bin 0 -> 15679 bytes .../Textures/Shapes/Normals/T_Random_N.jpg.meta | 99 + .../Textures/Shapes/Normals/T_Wave_N.jpg | Bin 0 -> 13151 bytes .../Textures/Shapes/Normals/T_Wave_N.jpg.meta | 92 + .../Textures/Shapes/Normals/T_couch_N.jpg | Bin 0 -> 154330 bytes .../Textures/Shapes/Normals/T_couch_N.jpg.meta | 99 + .../Textures/Shapes/Normals/T_crystal_N.jpg | Bin 0 -> 192518 bytes .../Textures/Shapes/Normals/T_crystal_N.jpg.meta | 99 + .../Textures/Shapes/Normals/WaterNorm.png | Bin 0 -> 111800 bytes .../Textures/Shapes/Normals/WaterNorm.png.meta | 99 + .../Textures/Shapes/T_Snowflake.png | Bin 0 -> 30976 bytes .../Textures/Shapes/T_Snowflake.png.meta | 99 + .../Assets/_PoiyomiShaders/Textures/UV_Check.png | Bin 0 -> 1079056 bytes .../_PoiyomiShaders/Textures/UV_Check.png.meta | 104 + .../Assets/_PoiyomiShaders/Textures/poigo.png | Bin 0 -> 354122 bytes .../Assets/_PoiyomiShaders/Textures/poigo.png.meta | 104 + .../Assets/_PoiyomiShaders/poiToonPresets.txt | 0 .../Assets/_PoiyomiShaders/poiToonPresets.txt.meta | 7 + 1753 files changed, 282491 insertions(+) create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ModularShaderEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ModularShaderEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ShaderModuleEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ShaderModuleEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/TemplateAssetEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/TemplateAssetEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/Migrator.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/Migrator.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/ModularShaderDebugger.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/ModularShaderDebugger.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/TextPopup.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Windows/TextPopup.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/LICENSE create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/LICENSE.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/MSSConstants.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/MSSConstants.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ModularShaderSystemDefinition.asmdef create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ModularShaderSystemDefinition.asmdef.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSDeleteIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSDeleteIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSDownIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSDownIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/EnablePropertyDrawer.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/EnablePropertyDrawer.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionPropertyDrawer.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionPropertyDrawer.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionTimelineStyle.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionTimelineStyle.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionView.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/FunctionView.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/InspectorList.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/InspectorList.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/MigratorDark.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/MigratorDark.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/MigratorLight.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/MigratorLight.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModularShaderDebuggerStyle.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModularShaderDebuggerStyle.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModularShaderEditor.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModularShaderEditor.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModuleTemplatePropertyDrawer.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ModuleTemplatePropertyDrawer.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/PropertyView.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/PropertyView.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ShaderModuleEditor.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ShaderModuleEditor.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ShaderPropertyDrawer.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/ShaderPropertyDrawer.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/TemplateGraphStyle.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/TemplateGraphStyle.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/VariablePropertyDrawer.uxml create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUIElements/VariablePropertyDrawer.uxml.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUpIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/MSSUpIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/ModularShaderIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/ModularShaderIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/RobotoMono-Regular.ttf create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/RobotoMono-Regular.ttf.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/ShaderModuleIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/ShaderModuleIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/TemplateCollectionIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/TemplateCollectionIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/TemplateIcon.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Resources/POIMSS/TemplateIcon.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/EnableProperty.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/EnableProperty.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ModularShader.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ModularShader.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ModuleTemplate.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ModuleTemplate.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/Property.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/Property.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ShaderFunction.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ShaderFunction.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ShaderModule.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/ShaderModule.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateAsset.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateAsset.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateAssetImporter.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateAssetImporter.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateCollectionAsset.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateCollectionAsset.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateCollectionAssetImporter.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/TemplateCollectionAssetImporter.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/Variable.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Scriptables/Variable.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ShaderGenerator.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ShaderGenerator.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ShaderStringBuilderExtensions.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/ShaderStringBuilderExtensions.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Config.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Config.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/DataStructs.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/DataStructs.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Drawers.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Drawers.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/EditorChanger.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/EditorChanger.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/EditorStructs.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/EditorStructs.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/GUIHelper.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/GUIHelper.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/GradiantEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/GradiantEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Helper.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Helper.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/HelperWeb.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/HelperWeb.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Locale.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Locale.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/MaterialLinker.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/MaterialLinker.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Mediator.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Mediator.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ModuleHandler.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ModuleHandler.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Parser.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Parser.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Presets.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Presets.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Settings.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Settings.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ShaderOptimizer.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ShaderOptimizer.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Styles.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Styles.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryAssemblyDefinition.asmdef create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryAssemblyDefinition.asmdef.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryFileBuilder.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/ThryFileBuilder.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Unity.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Editor/Unity.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/Example1.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/Example1.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/Example2.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/Example2.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/ThryLabelExample.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/ThryLabelExample.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/ThryPresetsExample.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/ThryPresetsExample.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/thry_locale_example.csv create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Examples/thry_locale_example.csv.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/LICENSE.md create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/LICENSE.md.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/README.md create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/README.md.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Resources.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Resources/thryEditor_link.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Resources/thryEditor_link.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Resources/thry_rect.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/Resources/thry_rect.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/docs.html create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/docs.html.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/thry_editor_locale.csv create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/ThryEditor/thry_editor_locale.csv.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/BakeToVertexColorsEditor.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/BakeToVertexColorsEditor.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/GradientFlood.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/GradientFlood.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/ModularShadersGeneratorWindow.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/ModularShadersGeneratorWindow.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/PoiData.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/PoiData.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/PoiHelpers.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/PoiHelpers.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/TextureUtility.cs create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Editor/TextureUtility.cs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/ModularShadersGeneratorStyle.uss create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/ModularShadersGeneratorStyle.uss.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/PoiTexturePacker.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/PoiTexturePacker.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/PoiTextureUnpacker.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/PoiTextureUnpacker.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/icon_link.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/icon_link.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/icon_link_pro.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/poi-tools/Resources/Poi/icon_link_pro.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Extras.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Extras/InvisStencil.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Extras/InvisStencil.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Extras/MasterScanner.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Extras/MasterScanner.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_FurLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_FurLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiAlphaToCoverage.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiAlphaToCoverage.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBackFace.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBackFace.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBlackLight.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBlackLight.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBlending.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBlending.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBulge.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiBulge.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiClearCoat.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiClearCoat.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiColors.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiColors.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiData.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiData.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDecal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDecal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDefines.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDefines.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDepthColor.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDepthColor.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDissolve.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDissolve.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDithering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDithering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiEmission.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiEmission.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiEnvironmentalRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFlipbook.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFlipbook.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFur.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFur.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFurCardPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiFurCardPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGeom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGeom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGeomFur.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGeomFur.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGlitter.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGlitter.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGrab.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiGrab.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiHologram.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiHologram.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiIridescence.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiIridescence.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMSDF.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMSDF.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMacros.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMacros.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMainTex.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMainTex.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMatcap.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMatcap.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMath.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMath.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMetal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMetal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMirror.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiMirror.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiOutlineFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiOutlineFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiOutlineVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiOutlineVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPanosphere.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPanosphere.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiParallax.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiParallax.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPassOutline.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPassOutline.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPassShadow.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiPassShadow.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRGBMask.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRGBMask.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRNG.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRNG.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRandom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRandom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiShadowVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpawnInFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpawnInFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpawnInVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpawnInVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpecular.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSpecular.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSubsurfaceScattering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiSubsurfaceScattering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiTessellation.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiTessellation.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiUVDistortion.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiUVDistortion.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiV2F.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiV2F.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVertexManipulations.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVertexManipulations.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVideo.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVideo.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVoronoi.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiVoronoi.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiWireframe.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiWireframe.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_Poicludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_Poicludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/Notes.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/Notes.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/DepthGet.prefab create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/DepthGet.prefab.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/EyeFX.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/EyeFX/PoiyomiEyeFX.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/EyeFX/PoiyomiEyeFX.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_FunctionsArtistic.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_FunctionsArtistic.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiAlphaToCoverage.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiAlphaToCoverage.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiAudioLink.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiAudioLink.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBRDF.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBRDF.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBackFace.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBackFace.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBlackLight.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBlackLight.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBlending.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBlending.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBulge.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiBulge.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiClearCoat.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiClearCoat.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiData.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiData.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDebug.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDebug.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDecal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDecal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDefines.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDefines.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDepthColor.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDepthColor.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDissolve.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDissolve.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDithering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiDithering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiEmission.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiEmission.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiEnvironmentalRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFlipbook.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFlipbook.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFur.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiFur.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGeomFur.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGeomFur.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGlitter.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGlitter.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGrab.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiGrab.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiHologram.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiHologram.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiIridescence.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiIridescence.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMSDF.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMSDF.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMacros.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMacros.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMainTex.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMainTex.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMatcap.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMatcap.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMath.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMath.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMetal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMetal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMirror.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiMirror.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiOutlineFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiOutlineFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiOutlineVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiOutlineVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPanosphere.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPanosphere.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiParallax.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiParallax.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPassOutline.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPassOutline.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPassShadow.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPassShadow.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPathing.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPathing.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPenetration.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiPenetration.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRGBMask.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRGBMask.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRandom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRandom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiShadowVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpawnInFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpawnInFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpawnInVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpawnInVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpecular.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSpecular.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSubsurfaceScattering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiSubsurfaceScattering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiTessellation.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiTessellation.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiUVDistortion.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiUVDistortion.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiV2F.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiV2F.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVertexManipulations.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVertexManipulations.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVideo.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVideo.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVoronoi.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiVoronoi.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiWireframe.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_PoiWireframe.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_Poicludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/CGI_Poicludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/Notes.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Includes/Notes.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Shaders.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Shaders/S_Poiyomi_Pro.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Fur/Pro/Shaders/S_Poiyomi_Pro.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiClearCoat.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiClearCoat.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiData.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiData.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDebug.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDebug.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDissolve.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDissolve.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDragNDropLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiDragNDropLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiEmission.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiEmission.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiFlipbook.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiFlipbook.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiGeom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiGeom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMainTex.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMainTex.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMatcap.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMatcap.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMetal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMetal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMirror.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiMirror.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiOutlineFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiOutlineFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiOutlineVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiOutlineVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPanosphere.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPanosphere.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiParallax.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiParallax.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiParticlePass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiParticlePass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPassOutline.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPassOutline.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPassShadow.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiPassShadow.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRandom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRandom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRefraction.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRefraction.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiShadowVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiSpecular.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiSpecular.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiSubsurfaceScattering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiSubsurfaceScattering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiTouch.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiTouch.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/PoiVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/Poicludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Includes/Poicludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/OutlinesPoiyomiToonCutout.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/OutlinesPoiyomiToonCutout.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/OutlinesPoiyomiToonTransparent.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/OutlinesPoiyomiToonTransparent.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/PoiyomiToonCutout.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/PoiyomiToonCutout.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/PoiyomiToonTransparent.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/LocalParticles/Shaders/Toon/PoiyomiToonTransparent.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial 1.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial 1.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial 2.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial 2.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagMaterial.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagPrefab.prefab create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/NameTagPrefab.prefab.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/PoiyomiNameTag.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/PoiyomiNameTag.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/Ring (1).fbx create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/Ring (1).fbx.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/YourName.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/YourName.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/poiyomi.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/NameTag/poiyomi.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Cutout_PPC.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Cutout_PPC.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Cutout_PPCO.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Cutout_PPCO.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Transparent_PPT.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_T_Transparent_PPT.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeCutout_PPC.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeCutout_PPC.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT_label create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT_label.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT_locale.csv create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/S_WireframeTransparent_PPT_locale.csv.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/PoiShatterHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/PoiShatterHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/Shatter.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/Shatter.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/ShatterPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/ShatterPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/ShatterWave2.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/ShatterWave2/ShatterWave2.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Test.unity create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Test.unity.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Untitled-1 copy 1.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Untitled-1 copy 1.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Untitled-1 copy.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Untitled-1 copy.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/GameboyRamp.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/GameboyRamp.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_CRT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_CRT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_IPS.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_IPS.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_LCD.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_LCD.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_OLED.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/Video/Textures/PIX_OLED.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiBasics.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiBasics.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiData.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiData.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiDefaultPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiDefaultPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiDragNDropLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiDragNDropLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiEmission.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiEmission.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiFun.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiFun.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiGeom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiGeom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMacros.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMacros.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMatcap.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMatcap.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMetal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiMetal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiOutlineVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPanosphere.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPanosphere.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPassOutline.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPassOutline.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPassShadow.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiPassShadow.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiRefraction.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiRefraction.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiScrollingLayers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiScrollingLayers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiShadowVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiSpecular.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiSpecular.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiSubsurfaceScattering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiSubsurfaceScattering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiTextureBlending.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiTextureBlending.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/PoiVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/Poicludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Includes/Poicludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Shader/Cubed.mat create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Shader/Cubed.mat.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Shader/PoiyomiCubed.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Patreon/VoxelCubed/Shader/PoiyomiCubed.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/PoiLabels.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/PoiLabels.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_FunctionsArtistic.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_FunctionsArtistic.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiAlphaToCoverage.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiAlphaToCoverage.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiAudioLink.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiAudioLink.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBRDF.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBRDF.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBackFace.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBackFace.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBlackLight.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBlackLight.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBlending.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBlending.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBulge.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiBulge.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiClearCoat.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiClearCoat.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiData.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiData.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDebug.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDebug.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDecal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDecal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDefines.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDefines.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDepthColor.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDepthColor.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDissolve.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDissolve.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDithering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiDithering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiEmission.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiEmission.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiEnvironmentalRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiFlipbook.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiFlipbook.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiGlitter.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiGlitter.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiGrab.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiGrab.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiHelpers.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiHelpers.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiHologram.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiHologram.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiIridescence.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiIridescence.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMSDF.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMSDF.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMacros.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMacros.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMainTex.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMainTex.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMatcap.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMatcap.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMath.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMath.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMetal.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMetal.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMirror.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiMirror.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiOutlineFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiOutlineFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiOutlineVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiOutlineVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPanosphere.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPanosphere.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiParallax.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiParallax.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPass.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPass.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPassOutline.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPassOutline.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPassShadow.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPassShadow.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPathing.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPathing.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPenetration.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiPenetration.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRGBMask.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRGBMask.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRandom.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRandom.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRimLighting.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiRimLighting.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowIncludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowIncludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiShadowVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpawnInFrag.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpawnInFrag.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpawnInVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpawnInVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpecular.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSpecular.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSubsurfaceScattering.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiSubsurfaceScattering.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiTessellation.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiTessellation.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiUVDistortion.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiUVDistortion.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiV2F.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiV2F.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVert.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVert.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVertexManipulations.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVertexManipulations.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVideo.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVideo.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVoronoi.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiVoronoi.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiWireframe.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_PoiWireframe.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_Poicludes.cginc create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/CGI_Poicludes.cginc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/Notes.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Includes/Notes.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/7PlusLabels.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/7PlusLabels.txt.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/PatchNotes.poi create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/PatchNotes.poi.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Pro.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Pro.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Pro_GrabPass.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Pro_GrabPass.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Toon.shader create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Pro/Shaders/S_Poiyomi_Toon.shader.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Clouds_CM.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Clouds_CM.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Gold_CM.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Gold_CM.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Shine_CM.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_Shine_CM.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_ToonLit_CM.psd create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_ToonLit_CM.psd.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_iridescent_CM.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Cubemaps/T_iridescent_CM.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Debug.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Debug/T_SecretMessage.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Debug/T_SecretMessage.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_Default_CM.exr create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_Default_CM.exr.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_Default_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_Default_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_MainTex_D.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Defaults/T_MainTex_D.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Detail.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Detail/T_Cracks_D.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Detail/T_Cracks_D.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/DiscordBannerTrans.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/DiscordBannerTrans.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Distortion.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Distortion/T_DistortionMap0_DM.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Distortion/T_DistortionMap0_DM.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Distortion/T_DistortionMap1_DM.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Distortion/T_DistortionMap1_DM.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_DigitalBold_FONT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_DigitalBold_FONT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoBlack_FONT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoBlack_FONT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoMedium_FONT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoMedium_FONT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoRegular_FONT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fonts/T_RobotoRegular_FONT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (1).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (1).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (1).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (1).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (10).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (10).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (11).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (11).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (12).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (12).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (13).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (13).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (14).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (14).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (15).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (15).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (16).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (16).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (17).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (17).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (18).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (18).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (19).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (19).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (2).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (2).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (2).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (2).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (21).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (21).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (22).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (22).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (23).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (23).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (24).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (24).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (3).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (3).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (4).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (4).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (4).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (4).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (5).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (5).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (6).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (6).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (7).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (7).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (8).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (8).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (9).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/Fur (9).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/FurHeightMap.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/FurHeightMap.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/noise_simplex.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/noise_simplex.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/ornage-fur-texture.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Fur/ornage-fur-texture.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_2ColorLines_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_2ColorLines_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_3ColorLines_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_3ColorLines_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_FireWorks_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_FireWorks_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_GrayThing_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_GrayThing_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Hearts_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Hearts_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_HorizontalCircles_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_HorizontalCircles_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Matrix_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Matrix_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Ovals_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Ovals_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Snakes_GIF.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/T_Snakes_GIF.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/VerticalCircles.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/VerticalCircles.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/Waves.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/Waves.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/zigzags.gif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Gifs/zigzags.gif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/LUTs.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/LUTs/dfg-multiscatter-cloth.exr create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/LUTs/dfg-multiscatter-cloth.exr.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Grid_MBW.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Grid_MBW.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_RGBA_Mask.tif create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_RGBA_Mask.tif.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW 1.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW 1.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_Star_MBW.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_circuit_MBW.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Masks/T_circuit_MBW.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/LatexMatcap2.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/LatexMatcap2.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/MatcapLatex.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/MatcapLatex.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_MatcapPinkBlue_MC.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_MatcapPinkBlue_MC.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).bmp create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).bmp.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (1).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (10).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (10).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (10).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (10).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (11).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (11).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (11).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (11).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (12).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (12).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (12).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (12).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (13).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (13).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (13).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (13).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (14).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (14).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (14).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (14).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (15).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (15).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (15).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (15).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (16).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (16).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (16).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (16).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (17).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (17).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (17).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (17).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (18).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (18).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (18).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (18).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (19).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (19).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (19).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (19).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (2).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (2).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (2).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (2).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (20).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (20).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (20).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (20).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (21).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (21).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (21).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (21).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (22).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (22).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (22).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (22).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (23).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (23).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (23).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (23).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (24).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (24).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (24).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (24).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (25).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (25).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (25).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (25).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (26).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (26).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (26).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (26).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (27).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (27).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (27).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (27).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (28).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (28).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (28).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (28).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (29).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (29).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (29).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (29).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (3).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (3).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (3).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (3).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (30).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (30).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (30).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (30).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (31).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (31).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (31).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (31).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (32).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (32).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (32).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (32).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (33).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (33).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (33).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (33).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (34).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (34).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (35).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (35).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (36).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (36).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (37).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (37).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (38).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (38).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (39).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (39).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (4).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (4).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (4).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (4).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (40).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (40).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (41).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (41).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (42).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (42).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (43).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (43).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (44).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (44).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (45).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (45).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (46).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (46).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (47).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (47).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (5).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (5).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (5).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (5).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (6).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (6).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (6).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (6).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (7).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (7).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (7).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (7).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (8).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (8).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (8).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (8).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (9).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (9).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (9).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Matcap_MC (9).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Rainbow_Matcap.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Matcaps/T_Rainbow_Matcap.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_Black.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_Black.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_Circle.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_Circle.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_LightRainbowVertical.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_LightRainbowVertical.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_PastelRainbowVertical.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_PastelRainbowVertical.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_RainbowHorizontal.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_RainbowHorizontal.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_RainbowVertical.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Misc/T_RainbowVertical.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/Gradient.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/Gradient.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/Gradient2.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/Gradient2.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Abstract2_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Abstract2_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Abstract_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Abstract_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Blotch_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Blotch_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Brick2_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Brick2_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Brick_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Brick_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Caustic_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Caustic_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Cell_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Cell_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Checker_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Checker_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Cloudy_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Cloudy_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_InvertedHex_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_InvertedHex_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (1).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (1).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (1).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (1).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (10).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (10).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (11).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (11).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (12).TGA create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (12).TGA.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (12).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (12).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (13).TGA create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (13).TGA.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (13).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (13).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (14).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (14).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (15).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (15).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (16).TGA create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (16).TGA.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (16).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (16).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (17).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (17).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (18).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (18).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (19).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (19).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (2).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (2).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (2).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (2).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (20).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (20).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (21).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (21).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (22).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (22).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (23).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (23).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (3).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (3).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (4).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (4).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (5).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (5).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (6).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (6).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (7).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (7).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (8).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (8).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (9).TGA create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (9).TGA.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (9).jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No (9).jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (1).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (1).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (10).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (10).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (11).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (11).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (12).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (12).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (13).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (13).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (14).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (14).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (15).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (15).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (16).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (16).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (17).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (17).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (18).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (18).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (2).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (2).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (3).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (3).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (4).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (4).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (5).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (5).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (6).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (6).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (7).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (7).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (8).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (8).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (9).png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Noise_No.png (9).png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Pattern2_Noise.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Pattern2_Noise.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Pattern_Noise.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Pattern_Noise.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Sketch_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Sketch_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Smudge_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Smudge_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Vornoi2_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Vornoi2_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Voronoi_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Voronoi_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Wiggly_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_Wiggly_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_ZigZag_Noise.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Noise/T_ZigZag_Noise.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_PathMap_Color.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_PathMap_Color.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_PathMap_RGB.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_PathMap_RGB.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_WigglePath_RGB.tga create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Path/T_WigglePath_RGB.tga.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/SkinLUT.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/SkinLUT.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Hair_SR.tga create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Hair_SR.tga.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Metal_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Metal_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Miami.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Miami.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Mihoyo_MCSR.tga create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Mihoyo_MCSR.tga.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Neitri_skin_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Neitri_skin_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Skin_SR.tga create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_Skin_SR.tga.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_SoftHardBlack_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_SoftHardBlack_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_SoftHardGrey_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_SoftHardGrey_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_ToonSkin_SR.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Ramps/T_ToonSkin_SR.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Cloth_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Cloth_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Fabric_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Fabric_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Random_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Random_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Wave_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_Wave_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_couch_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_couch_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_crystal_N.jpg create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/T_crystal_N.jpg.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/WaterNorm.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/Normals/WaterNorm.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/T_Snowflake.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/Shapes/T_Snowflake.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/UV_Check.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/UV_Check.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/poigo.png create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Textures/poigo.png.meta create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/poiToonPresets.txt create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/poiToonPresets.txt.meta (limited to 'VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders') diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples.meta new file mode 100644 index 00000000..517e2171 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d6049688051f5f4286acaa0018213d1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat new file mode 100644 index 00000000..0d063da4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat @@ -0,0 +1,1708 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_AudioLinkDecalRotation + m_Shader: {fileID: 4800000, guid: 4287dba4d1fb38d44b899145af5fb81a, type: 3} + m_ShaderKeywords: VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: New Material 5 + OriginalShader: ".poiyomi/\u2605 Poiyomi Pro \u2605" + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FurHeightMap: + m_Texture: {fileID: 2800000, guid: 4936f95df08752e46940d871d9288f05, type: 3} + m_Scale: {x: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _FurMask: + m_Texture: {fileID: 2800000, guid: e21db298689c4f84abe7200bc9c130da, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FurTexture: + m_Texture: {fileID: 2800000, guid: c0125b075311ac74c93f83b0e6558dc0, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 689a97b4b90b8b94baea6243cdc7a0d6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - GeometryShader_Enabled: 1 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaToMask: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AoRampMax: 1 + - _AoRampMin: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ContinuousDissolve: 0 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugCameraData: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugMeshData: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMin: 1 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _FurAO: 0.5 + - _FurFadeStart: 0 + - _FurGravityStrength: 0 + - _FurHeightMapMax: 1 + - _FurHeightMapMin: 0 + - _FurLayers: 23 + - _FurLength: 0.2 + - _FurMaxDistance: 10 + - _FurMinDistance: 2 + - _FurTipAlpha: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUseSurfaceColor: 0 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Length: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientStart: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 4 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap2Add: 0 + - _Matcap2Border: 0.43 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _MatcapAdd: 0 + - _MatcapBorder: 0.43 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionMultiplier: 1 + - _PPHelp: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _TextEnabled: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexUnwrap: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_furAdvanced: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_furOptions: 1 + - m_lightingOptions: 0 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_RGBMask: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_furAdvanced: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 0, b: 0, a: 1} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _FurColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat.meta new file mode 100644 index 00000000..2283d253 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_AudioLinkDecalRotation.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 89163e16ffe27594aa57854707a6b83d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat new file mode 100644 index 00000000..c95fd98d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat @@ -0,0 +1,2646 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Crystal + m_Shader: {fileID: 4800000, guid: 8c9fa15670553cb43b993d5f5df2bf53, type: 3} + m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + _SPECGLOSSMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: M_Poiyomi_Slime-194ba681 + OriginalShader: ".poiyomi/\u2605 Poiyomi Pro \u2605" + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 2800000, guid: 446cd9992afb87f45b237154fea5f570, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 2800000, guid: 07f0a54a3a4e7754eabc8ced70d7b30c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 2800000, guid: 07f0a54a3a4e7754eabc8ced70d7b30c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainHueShiftMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: a6d6984545cde4a4f9317b17d6dca225, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1st2nd_Shades_FeatherAnimated: 0 + - _1stShadeMapMask_Inverse: 0 + - _1stShadeMapMask_InverseAnimated: 0 + - _1st_ShadeColorAnimated: 0 + - _1st_ShadeMapAnimated: 0 + - _1st_ShadeMapPanAnimated: 0 + - _1st_ShadeMapUV: 0 + - _1st_ShadeMapUVAnimated: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2ndShadeMapMask_InverseAnimated: 0 + - _2nd_ShadeColorAnimated: 0 + - _2nd_ShadeMapAnimated: 0 + - _2nd_ShadeMapPanAnimated: 0 + - _2nd_ShadeMapUV: 0 + - _2nd_ShadeMapUVAnimated: 0 + - _AOStrength: 0 + - _AOStrengthAnimated: 0 + - _AlphaMaskAnimated: 0 + - _AlphaMaskPanAnimated: 0 + - _AlphaMaskUV: 0 + - _AlphaMaskUVAnimated: 0 + - _AlphaMod: 0 + - _AlphaModAnimated: 0 + - _AlphaPremultiply: 0 + - _AlphaPremultiplyAnimated: 0 + - _AlphaToMask: 0 + - _AlphaToMaskAnimated: 0 + - _AngleCompareTo: 0 + - _AngleCompareToAnimated: 0 + - _AngleForwardDirectionAnimated: 0 + - _AngleMinAlpha: 0 + - _AngleMinAlphaAnimated: 0 + - _AngleType: 0 + - _AngleTypeAnimated: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec1Alpha1Animated: 0 + - _AnisoSpec1AlphaAnimated: 0 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoSpec2Alpha1Animated: 0 + - _AnisoSpec2AlphaAnimated: 0 + - _AnisoTangentMap1Animated: 0 + - _AnisoTangentMap1PanAnimated: 0 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMap1UVAnimated: 0 + - _AnisoTangentMapAnimated: 0 + - _AnisoTangentMapPanAnimated: 0 + - _AnisoTangentMapUV: 0 + - _AnisoTangentMapUVAnimated: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AnisoUseTangentMap1Animated: 0 + - _AnisoUseTangentMapAnimated: 0 + - _AttenuationMultiplier: 0 + - _AttenuationMultiplierAnimated: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFAnisotropyAnimated: 0 + - _BRDFFallbackAnimated: 0 + - _BRDFForceFallback: 0 + - _BRDFForceFallbackAnimated: 0 + - _BRDFGlossiness: 0 + - _BRDFGlossinessAnimated: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFInvertGlossinessAnimated: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicAnimated: 0 + - _BRDFMetallicGlossMapAnimated: 0 + - _BRDFMetallicGlossMapPanAnimated: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapToolTipAnimated: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicGlossMapUVAnimated: 0 + - _BRDFMetallicMapAnimated: 0 + - _BRDFMetallicMapPanAnimated: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapToolTipAnimated: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicMapUVAnimated: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectanceAnimated: 0 + - _BRDFReflectionsEnabled: 1 + - _BRDFReflectionsEnabledAnimated: 0 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularEnabledAnimated: 0 + - _BRDFSpecularMapAnimated: 0 + - _BRDFSpecularMapPanAnimated: 0 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapToolTipAnimated: 0 + - _BRDFSpecularMapUV: 0 + - _BRDFSpecularMapUVAnimated: 0 + - _BackFaceColorAnimated: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceDetailIntensityAnimated: 0 + - _BackFaceEmissionStrength: 0 + - _BackFaceEmissionStrengthAnimated: 0 + - _BackFaceEnabled: 0 + - _BackFaceEnabledAnimated: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftAnimated: 0 + - _BackFacePanningAnimated: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureAnimated: 0 + - _BackFaceTextureUV: 0 + - _BackFaceTextureUVAnimated: 0 + - _BaseColor_Step: 0.5 + - _BaseColor_StepAnimated: 0 + - _BaseShade_Feather: 0.0001 + - _BaseShade_FeatherAnimated: 0 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskClearCoatAnimated: 0 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDebugAnimated: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskDissolveAnimated: 0 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEmission2Animated: 0 + - _BlackLightMaskEmissionAnimated: 0 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskEnabledAnimated: 0 + - _BlackLightMaskEndAnimated: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskFlipbookAnimated: 0 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskGlitterAnimated: 0 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskIridescenceAnimated: 0 + - _BlackLightMaskKeysAnimated: 0 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMatcap2Animated: 0 + - _BlackLightMaskMatcapAnimated: 0 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskMetallicAnimated: 0 + - _BlackLightMaskPanosphere: 4 + - _BlackLightMaskPanosphereAnimated: 0 + - _BlackLightMaskStartAnimated: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendOpAlphaAnimated: 0 + - _BlendOpAnimated: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorAnimated: 0 + - _BlueTextureAnimated: 0 + - _BuldgeFadeLength: 31.55 + - _BuldgeFadeLengthAnimated: 0 + - _BuldgeHeight: 0.2 + - _BuldgeHeightAnimated: 0 + - _BulgeMaskAnimated: 0 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapAnimated: 0 + - _BumpMapPanAnimated: 0 + - _BumpMapUV: 0 + - _BumpMapUVAnimated: 0 + - _BumpScale: 1 + - _BumpScaleAnimated: 0 + - _CameraAngleMax: 90 + - _CameraAngleMaxAnimated: 0 + - _CameraAngleMin: 45 + - _CameraAngleMinAnimated: 0 + - _ClearCoat: 1 + - _ClearCoatAnimated: 0 + - _ClearCoatCubeMapAnimated: 0 + - _ClearCoatForceLighting: 0 + - _ClearCoatForceLightingAnimated: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatInvertSmoothnessAnimated: 0 + - _ClearCoatMaskAnimated: 0 + - _ClearCoatMaskPanAnimated: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatMaskUVAnimated: 0 + - _ClearCoatNormalToUse: 0 + - _ClearCoatNormalToUseAnimated: 0 + - _ClearCoatSampleWorld: 0 + - _ClearCoatSampleWorldAnimated: 0 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessAnimated: 0 + - _ClearCoatSmoothnessMapAnimated: 0 + - _ClearCoatSmoothnessMapPanAnimated: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatSmoothnessMapUVAnimated: 0 + - _ClearCoatTintAnimated: 0 + - _Clearcoat: 1 + - _ClearcoatAnimated: 0 + - _ClearcoatAnisotropy: 0 + - _ClearcoatAnisotropyAnimated: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableReflectionsAnimated: 0 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatEnableSpecularAnimated: 0 + - _ClearcoatFallbackAnimated: 0 + - _ClearcoatForceFallback: 0 + - _ClearcoatForceFallbackAnimated: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatGlossinessAnimated: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatInvertSmoothnessAnimated: 0 + - _ClearcoatMapAnimated: 0 + - _ClearcoatMapPanAnimated: 0 + - _ClearcoatMapUV: 0 + - _ClearcoatMapUVAnimated: 0 + - _ClippingMaskAnimated: 0 + - _ClippingMaskPanAnimated: 0 + - _ClippingMaskUV: 0 + - _ClippingMaskUVAnimated: 0 + - _ColorAnimated: 0 + - _ColorMask: 15 + - _ColorMaskAnimated: 0 + - _ContinuousDissolve: 0 + - _ContinuousDissolveAnimated: 0 + - _CubeMapAnimated: 0 + - _Cull: 2 + - _CullAnimated: 0 + - _Curvature: 0 + - _Cutoff: 0 + - _CutoffAnimated: 0 + - _DebugCameraData: 0 + - _DebugCameraDataAnimated: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugLightingDataAnimated: 0 + - _DebugMeshData: 0 + - _DebugMeshDataAnimated: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAdd: 0 + - _DecalBlendAddAnimated: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendAlphaAnimated: 0 + - _DecalBlendMultiply: 0 + - _DecalBlendMultiplyAnimated: 0 + - _DecalBlendReplace: 0 + - _DecalBlendReplaceAnimated: 0 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalBlendTypeAnimated: 0 + - _DecalColorAnimated: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEmissionStrengthAnimated: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalEnabledAnimated: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftAnimated: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftEnabledAnimated: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalHueShiftSpeedAnimated: 0 + - _DecalMaskAnimated: 0 + - _DecalMaskPanAnimated: 0 + - _DecalMaskUV: 0 + - _DecalMaskUVAnimated: 0 + - _DecalPositionAnimated: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationAnimated: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalRotationSpeedAnimated: 0 + - _DecalScaleAnimated: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureAnimated: 0 + - _DecalTexturePanAnimated: 0 + - _DecalTextureUV: 0 + - _DecalTextureUVAnimated: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DecalTiledAnimated: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxAnimated: 0 + - _DepthAlphaMin: 1 + - _DepthAlphaMinAnimated: 0 + - _DepthGlowColorAnimated: 0 + - _DepthGlowEmission: 3 + - _DepthGlowEmissionAnimated: 0 + - _DepthGradientAnimated: 0 + - _DepthGradientBlend: 0 + - _DepthGradientBlendAnimated: 0 + - _DepthGradientPanAnimated: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientTextureUVAnimated: 0 + - _DepthGradientUV: 0 + - _DepthGradientUVAnimated: 0 + - _DepthMaskAnimated: 0 + - _DepthMaskPanAnimated: 0 + - _DepthMaskUV: 0 + - _DepthMaskUVAnimated: 0 + - _DetailBrightness: 1 + - _DetailBrightnessAnimated: 0 + - _DetailEnabled: 0 + - _DetailMaskAnimated: 0 + - _DetailMaskPanAnimated: 0 + - _DetailMaskUV: 0 + - _DetailMaskUVAnimated: 0 + - _DetailNormalMapAnimated: 0 + - _DetailNormalMapPanAnimated: 0 + - _DetailNormalMapScale: 0 + - _DetailNormalMapScaleAnimated: 0 + - _DetailNormalMapUV: 0 + - _DetailNormalMapUVAnimated: 0 + - _DetailTexAnimated: 0 + - _DetailTexIntensity: 1 + - _DetailTexIntensityAnimated: 0 + - _DetailTexPanAnimated: 0 + - _DetailTexUV: 0 + - _DetailTexUVAnimated: 0 + - _DetailTintAnimated: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha0Animated: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha1Animated: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha2Animated: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha3Animated: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha4Animated: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha5Animated: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha6Animated: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha7Animated: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha8Animated: 0 + - _DissolveAlpha9: 0 + - _DissolveAlpha9Animated: 0 + - _DissolveAlphaAnimated: 0 + - _DissolveDetailNoiseAnimated: 0 + - _DissolveDetailNoisePanAnimated: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailNoiseUVAnimated: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveDetailStrengthAnimated: 0 + - _DissolveEdgeColorAnimated: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeEmissionAnimated: 0 + - _DissolveEdgeGradientAnimated: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHardnessAnimated: 0 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftAnimated: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftEnabledAnimated: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeHueShiftSpeedAnimated: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEdgeWidthAnimated: 0 + - _DissolveEmission1Side: 2 + - _DissolveEmission1SideAnimated: 0 + - _DissolveEmissionSide: 2 + - _DissolveEmissionSideAnimated: 0 + - _DissolveEndPointAnimated: 0 + - _DissolveHueShift: 0 + - _DissolveHueShiftAnimated: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftEnabledAnimated: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveHueShiftSpeedAnimated: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertDetailNoiseAnimated: 0 + - _DissolveInvertNoise: 0 + - _DissolveInvertNoiseAnimated: 0 + - _DissolveMaskAnimated: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskInvertAnimated: 0 + - _DissolveMaskPanAnimated: 0 + - _DissolveMaskUV: 0 + - _DissolveMaskUVAnimated: 0 + - _DissolveNoiseTextureAnimated: 0 + - _DissolveNoiseTexturePanAnimated: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveNoiseTextureUVAnimated: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PEdgeLengthAnimated: 0 + - _DissolveP2PWorldLocal: 0 + - _DissolveP2PWorldLocalAnimated: 0 + - _DissolveStartPointAnimated: 0 + - _DissolveTextureColorAnimated: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToEmissionStrengthAnimated: 0 + - _DissolveToTextureAnimated: 0 + - _DissolveToTexturePanAnimated: 0 + - _DissolveToTextureUV: 0 + - _DissolveToTextureUVAnimated: 0 + - _DissolveType: 1 + - _DissolveTypeAnimated: 0 + - _DissolveUseVertexColors: 0 + - _DissolveUseVertexColorsAnimated: 0 + - _DistortionFlowTexture1Animated: 0 + - _DistortionFlowTextureAnimated: 0 + - _DistortionMaskAnimated: 0 + - _DistortionMaskPanAnimated: 0 + - _DistortionMaskUV: 0 + - _DistortionMaskUVAnimated: 0 + - _DistortionSpeed1Animated: 0 + - _DistortionSpeedAnimated: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1Animated: 0 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAnimated: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DitherGradient: 0.1 + - _DitherGradientAnimated: 0 + - _DitheringEnabled: 0 + - _DitheringEnabledAnimated: 0 + - _DstBlend: 0 + - _DstBlendAnimated: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap1Animated: 0 + - _EmissionBaseColorAsMapAnimated: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabledAnimated: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset1Animated: 0 + - _EmissionBlinkingOffsetAnimated: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled1Animated: 0 + - _EmissionCenterOutEnabledAnimated: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed1Animated: 0 + - _EmissionCenterOutSpeedAnimated: 0 + - _EmissionColor1Animated: 0 + - _EmissionColorAnimated: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift1Animated: 0 + - _EmissionHueShiftAnimated: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled1Animated: 0 + - _EmissionHueShiftEnabledAnimated: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1Animated: 0 + - _EmissionMap1PanAnimated: 0 + - _EmissionMap1UV: 0 + - _EmissionMap1UVAnimated: 0 + - _EmissionMapAnimated: 0 + - _EmissionMapPanAnimated: 0 + - _EmissionMapUV: 0 + - _EmissionMapUVAnimated: 0 + - _EmissionMask1Animated: 0 + - _EmissionMask1PanAnimated: 0 + - _EmissionMask1UV: 0 + - _EmissionMask1UVAnimated: 0 + - _EmissionMaskAnimated: 0 + - _EmissionMaskPanAnimated: 0 + - _EmissionMaskUV: 0 + - _EmissionMaskUVAnimated: 0 + - _EmissionReplace: 0 + - _EmissionReplaceAnimated: 0 + - _EmissionScrollingCurve1Animated: 0 + - _EmissionScrollingCurveAnimated: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingOffset1Animated: 0 + - _EmissionScrollingOffsetAnimated: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve1Animated: 0 + - _EmissionScrollingUseCurveAnimated: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor1Animated: 0 + - _EmissionScrollingVertexColorAnimated: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength1Animated: 0 + - _EmissionStrengthAnimated: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max1Animated: 0 + - _EmissiveBlink_MaxAnimated: 0 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min1Animated: 0 + - _EmissiveBlink_MinAnimated: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity1Animated: 0 + - _EmissiveBlink_VelocityAnimated: 0 + - _EmissiveScroll_Direction1Animated: 0 + - _EmissiveScroll_DirectionAnimated: 0 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval1Animated: 0 + - _EmissiveScroll_IntervalAnimated: 0 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity1Animated: 0 + - _EmissiveScroll_VelocityAnimated: 0 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width1Animated: 0 + - _EmissiveScroll_WidthAnimated: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBlur: 0 + - _EnableBlurAnimated: 0 + - _EnableBulge: 0 + - _EnableBulgeAnimated: 0 + - _EnableClearCoat: 0 + - _EnableClearCoatAnimated: 0 + - _EnableDissolve: 0 + - _EnableDissolveAnimated: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAnimated: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1Animated: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionAnimated: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableEnvironmentalRimAnimated: 0 + - _EnableFlipbook: 0 + - _EnableFlipbookAnimated: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission1Animated: 0 + - _EnableGITDEmissionAnimated: 0 + - _EnableHolo: 0 + - _EnableHoloAnimated: 0 + - _EnableIridescence: 0 + - _EnableIridescenceAnimated: 0 + - _EnableLighting: 0 + - _EnableLightingAnimated: 0 + - _EnableMetallic: 1 + - _EnableMetallicAnimated: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorOptionsAnimated: 0 + - _EnableMirrorTexture: 0 + - _EnableMirrorTextureAnimated: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRandomAnimated: 0 + - _EnableRimLighting: 1 + - _EnableRimLightingAnimated: 0 + - _EnableSSS: 0 + - _EnableSSSAnimated: 0 + - _EnableScifiSpawnIn: 0 + - _EnableScifiSpawnInAnimated: 0 + - _EnableSpecular: 1 + - _EnableSpecular1: 0 + - _EnableSpecular1Animated: 0 + - _EnableSpecularAnimated: 0 + - _EnableTouchGlow: 0 + - _EnableTouchGlowAnimated: 0 + - _EnableVertexGlitch: 0 + - _EnableVertexGlitchAnimated: 0 + - _EnableVideo: 0 + - _EnableVideoAnimated: 0 + - _EnableVoronoi: 0 + - _EnableVoronoiAnimated: 0 + - _EntranceStiffness: 0 + - _EntryOpenDuration: 0.1 + - _FadeLength: 0.02 + - _FadeLengthAnimated: 0 + - _FlipbookAdd: 0 + - _FlipbookAddAnimated: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookAlphaControlsFinalAlphaAnimated: 0 + - _FlipbookColorAnimated: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookColorReplacesAnimated: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCrossfadeEnabledAnimated: 0 + - _FlipbookCrossfadeRangeAnimated: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookCurrentFrameAnimated: 0 + - _FlipbookEmissionStrength: 0 + - _FlipbookEmissionStrengthAnimated: 0 + - _FlipbookFPS: 30 + - _FlipbookFPSAnimated: 0 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftAnimated: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftEnabledAnimated: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookHueShiftSpeedAnimated: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookIntensityControlsAlphaAnimated: 0 + - _FlipbookMaskAnimated: 0 + - _FlipbookMaskPanAnimated: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMaskUVAnimated: 0 + - _FlipbookMultiply: 0 + - _FlipbookMultiplyAnimated: 0 + - _FlipbookReplace: 1 + - _FlipbookReplaceAnimated: 0 + - _FlipbookRotation: 0 + - _FlipbookRotationAnimated: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookRotationSpeedAnimated: 0 + - _FlipbookScaleOffsetAnimated: 0 + - _FlipbookTexArrayAnimated: 0 + - _FlipbookTexArrayPanAnimated: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTexArrayUVAnimated: 0 + - _FlipbookTiled: 0 + - _FlipbookTiledAnimated: 0 + - _FlipbookTotalFrames: 1 + - _FlipbookTotalFramesAnimated: 0 + - _ForceOpaque: 0 + - _ForceOpaqueAnimated: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier1Animated: 0 + - _GITDEMaxEmissionMultiplierAnimated: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight1Animated: 0 + - _GITDEMaxLightAnimated: 0 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier1Animated: 0 + - _GITDEMinEmissionMultiplierAnimated: 0 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight1Animated: 0 + - _GITDEMinLightAnimated: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh1Animated: 0 + - _GITDEWorldOrMeshAnimated: 0 + - _GlitterAngleRange: 90 + - _GlitterAngleRangeAnimated: 0 + - _GlitterBias: 0.8 + - _GlitterBiasAnimated: 0 + - _GlitterBlendType: 0 + - _GlitterBlendTypeAnimated: 0 + - _GlitterBrightness: 3 + - _GlitterBrightnessAnimated: 0 + - _GlitterCenterSize: 0.08 + - _GlitterCenterSizeAnimated: 0 + - _GlitterColorAnimated: 0 + - _GlitterColorMapAnimated: 0 + - _GlitterColorMapPanAnimated: 0 + - _GlitterColorMapUV: 0 + - _GlitterColorMapUVAnimated: 0 + - _GlitterContrast: 300 + - _GlitterContrastAnimated: 0 + - _GlitterEnable: 0 + - _GlitterEnableAnimated: 0 + - _GlitterFrequency: 300 + - _GlitterFrequencyAnimated: 0 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftAnimated: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftEnabledAnimated: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterHueShiftSpeedAnimated: 0 + - _GlitterJaggyFix: 0 + - _GlitterJaggyFixAnimated: 0 + - _GlitterJitter: 1 + - _GlitterJitterAnimated: 0 + - _GlitterMaskAnimated: 0 + - _GlitterMaskPanAnimated: 0 + - _GlitterMaskUV: 0 + - _GlitterMaskUVAnimated: 0 + - _GlitterMinBrightness: 0 + - _GlitterMinBrightnessAnimated: 0 + - _GlitterMinMaxBrightnessAnimated: 0 + - _GlitterMinMaxSaturationAnimated: 0 + - _GlitterMinMaxSizeAnimated: 0 + - _GlitterMode: 0 + - _GlitterModeAnimated: 0 + - _GlitterPanAnimated: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomColorsAnimated: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomRotationAnimated: 0 + - _GlitterRandomSize: 0 + - _GlitterRandomSizeAnimated: 0 + - _GlitterShape: 0 + - _GlitterShapeAnimated: 0 + - _GlitterSize: 0.3 + - _GlitterSizeAnimated: 0 + - _GlitterSpeed: 10 + - _GlitterSpeedAnimated: 0 + - _GlitterTextureAnimated: 0 + - _GlitterTexturePanAnimated: 0 + - _GlitterTextureRotation: 0 + - _GlitterTextureRotationAnimated: 0 + - _GlitterUseSurfaceColor: 0 + - _GlitterUseSurfaceColorAnimated: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GrabBlurDirections: 4 + - _GrabBlurDirectionsAnimated: 0 + - _GrabBlurDistance: 0 + - _GrabBlurDistanceAnimated: 0 + - _GrabBlurQuality: 2 + - _GrabBlurQualityAnimated: 0 + - _GrabDstBlend: 0 + - _GrabDstBlendAnimated: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendFactorAnimated: 0 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabPassUseAlphaAnimated: 0 + - _GrabSrcBlend: 2 + - _GrabSrcBlendAnimated: 0 + - _GreenColorAnimated: 0 + - _GreenTextureAnimated: 0 + - _HoloAlphaMapAnimated: 0 + - _HoloCoordinateSpace: 0 + - _HoloCoordinateSpaceAnimated: 0 + - _HoloDirectionAnimated: 0 + - _HoloFresnelAlpha: 0 + - _HoloFresnelAlphaAnimated: 0 + - _HoloLineDensity: 10 + - _HoloLineDensityAnimated: 0 + - _HoloRimSharpness: 0.5 + - _HoloRimSharpnessAnimated: 0 + - _HoloRimWidth: 0.5 + - _HoloRimWidthAnimated: 0 + - _HoloScrollSpeed: 1 + - _HoloScrollSpeedAnimated: 0 + - _IgnoreFog: 0 + - _IgnoreFogAnimated: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _InvertSmoothnessAnimated: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAddBlendAnimated: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceEmissionStrengthAnimated: 0 + - _IridescenceIntensity: 1 + - _IridescenceIntensityAnimated: 0 + - _IridescenceMaskAnimated: 0 + - _IridescenceMaskUV: 0 + - _IridescenceMaskUVAnimated: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceMultiplyBlendAnimated: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalIntensityAnimated: 0 + - _IridescenceNormalMapAnimated: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalSelectionAnimated: 0 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalToggleAnimated: 0 + - _IridescenceNormalUV: 0 + - _IridescenceNormalUVAnimated: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceRampAnimated: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceReplaceBlendAnimated: 0 + - _IridescenceTime: 0 + - _IridescenceTimeAnimated: 0 + - _Length: 0 + - _LightingAOTexAnimated: 0 + - _LightingAOTexPanAnimated: 0 + - _LightingAOTexUV: 0 + - _LightingAOTexUVAnimated: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveDetailStrengthAnimated: 0 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientEndAnimated: 0 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveGradientStartAnimated: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimitIntensityAnimated: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMaxIntensityAnimated: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditivePassthroughAnimated: 0 + - _LightingAdditiveType: 1 + - _LightingAdditiveTypeAnimated: 0 + - _LightingDetailShadowsAnimated: 0 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsEnabledAnimated: 0 + - _LightingDetailShadowsPanAnimated: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailShadowsUVAnimated: 0 + - _LightingDetailStrength: 1 + - _LightingDetailStrengthAnimated: 0 + - _LightingDirectColorMode: 0 + - _LightingDirectColorModeAnimated: 0 + - _LightingEnableAO: 0 + - _LightingEnableAOAnimated: 0 + - _LightingEnableHSL: 0 + - _LightingEnableHSLAnimated: 0 + - _LightingEndColorAnimated: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndAnimated: 0 + - _LightingGradientStart: 0 + - _LightingGradientStartAnimated: 0 + - _LightingHSLIntensity: 1 + - _LightingHSLIntensityAnimated: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIgnoreAmbientColorAnimated: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectColorModeAnimated: 0 + - _LightingIndirectContribution: 0.2 + - _LightingIndirectContributionAnimated: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightBrightnessAnimated: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMinShadowBrightnessRatioAnimated: 0 + - _LightingMode: 0 + - _LightingModeAnimated: 0 + - _LightingMonochromatic: 0 + - _LightingMonochromaticAnimated: 0 + - _LightingNoIndirectMultiplier: 0.5 + - _LightingNoIndirectMultiplierAnimated: 0 + - _LightingNoIndirectThreshold: 0.01 + - _LightingNoIndirectThresholdAnimated: 0 + - _LightingNumRamps: 1 + - _LightingNumRampsAnimated: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingOnlyUnityShadowsAnimated: 0 + - _LightingRampType: 0 + - _LightingRampTypeAnimated: 0 + - _LightingShadingEnabled: 0 + - _LightingShadingEnabledAnimated: 0 + - _LightingShadowColorAnimated: 0 + - _LightingShadowHuAnimatede: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowHueAnimated: 0 + - _LightingShadowLightness: 0.5 + - _LightingShadowLightnessAnimated: 0 + - _LightingShadowMaskAnimated: 0 + - _LightingShadowMaskPanAnimated: 0 + - _LightingShadowMaskUV: 0 + - _LightingShadowMaskUVAnimated: 0 + - _LightingShadowSaturation: 0.5 + - _LightingShadowSaturationAnimated: 0 + - _LightingShadowStrength1: 1 + - _LightingShadowStrength1Animated: 0 + - _LightingShadowStrength2: 1 + - _LightingShadowStrength2Animated: 0 + - _LightingShadowTextureAnimated: 0 + - _LightingShadowTexturePanAnimated: 0 + - _LightingShadowTextureUV: 0 + - _LightingShadowTextureUVAnimated: 0 + - _LightingStandardControlsToon: 0 + - _LightingStandardControlsToonAnimated: 0 + - _LightingStandardSmoothness: 0 + - _LightingStandardSmoothnessAnimated: 0 + - _LightingType: 0 + - _LightingTypeAnimated: 0 + - _LightingUncapped: 0 + - _LightingUncappedAnimated: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineColorAnimated: 0 + - _LineWidth: 0 + - _LineWidthAnimated: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainAlphaToCoverageAnimated: 0 + - _MainBrightness: 0 + - _MainBrightnessAnimated: 0 + - _MainColorAdjustTextureAnimated: 0 + - _MainColorAdjustTexturePanAnimated: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustTextureUVAnimated: 0 + - _MainDistanceFadeAnimated: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainEmissionStrengthAnimated: 0 + - _MainFadeTextureAnimated: 0 + - _MainFadeTexturePanAnimated: 0 + - _MainFadeTextureUV: 0 + - _MainFadeTextureUVAnimated: 0 + - _MainHueShift: 0 + - _MainHueShiftAnimated: 0 + - _MainHueShiftMaskAnimated: 0 + - _MainHueShiftMaskPanAnimated: 0 + - _MainHueShiftMaskUV: 0 + - _MainHueShiftMaskUVAnimated: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftReplaceAnimated: 0 + - _MainHueShiftSpeed: 0 + - _MainHueShiftSpeedAnimated: 0 + - _MainHueShiftToggle: 0 + - _MainHueShiftToggleAnimated: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMinAlphaAnimated: 0 + - _MainMipScale: 0.25 + - _MainMipScaleAnimated: 0 + - _MainShadowClipMod: 0 + - _MainShadowClipModAnimated: 0 + - _MainTexAnimated: 0 + - _MainTexPanAnimated: 0 + - _MainTex_STAnimated: 0 + - _MainTextureUV: 0 + - _MainTextureUVAnimated: 0 + - _MainUseVertexColorAlpha: 0 + - _MainUseVertexColorAlphaAnimated: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringAnimated: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap2Add: 0 + - _Matcap2AddAnimated: 0 + - _Matcap2Animated: 0 + - _Matcap2Border: 0.43 + - _Matcap2BorderAnimated: 0 + - _Matcap2ColorAnimated: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2EmissionStrengthAnimated: 0 + - _Matcap2Enable: 0 + - _Matcap2EnableAnimated: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftAnimated: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftEnabledAnimated: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2HueShiftSpeedAnimated: 0 + - _Matcap2Intensity: 1 + - _Matcap2IntensityAnimated: 0 + - _Matcap2LightMask: 0 + - _Matcap2LightMaskAnimated: 0 + - _Matcap2MaskAnimated: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskInvertAnimated: 0 + - _Matcap2MaskPanAnimated: 0 + - _Matcap2MaskUV: 0 + - _Matcap2MaskUVAnimated: 0 + - _Matcap2Multiply: 0 + - _Matcap2MultiplyAnimated: 0 + - _Matcap2Normal: 1 + - _Matcap2NormalAnimated: 0 + - _Matcap2Replace: 0 + - _Matcap2ReplaceAnimated: 0 + - _MatcapAdd: 0 + - _MatcapAddAnimated: 0 + - _MatcapAnimated: 0 + - _MatcapBorder: 0.43 + - _MatcapBorderAnimated: 0 + - _MatcapColorAnimated: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEmissionStrengthAnimated: 0 + - _MatcapEnable: 0 + - _MatcapEnableAnimated: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftAnimated: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftEnabledAnimated: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapHueShiftSpeedAnimated: 0 + - _MatcapIntensity: 1 + - _MatcapIntensityAnimated: 0 + - _MatcapLightMask: 0 + - _MatcapLightMaskAnimated: 0 + - _MatcapMaskAnimated: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskInvertAnimated: 0 + - _MatcapMaskPanAnimated: 0 + - _MatcapMaskUV: 0 + - _MatcapMaskUVAnimated: 0 + - _MatcapMultiply: 0 + - _MatcapMultiplyAnimated: 0 + - _MatcapNormal: 1 + - _MatcapNormalAnimated: 0 + - _MatcapReplace: 1 + - _MatcapReplaceAnimated: 0 + - _MetalReflectionTintAnimated: 0 + - _Metallic: 0 + - _MetallicAnimated: 0 + - _MetallicMaskAnimated: 0 + - _MetallicMaskPanAnimated: 0 + - _MetallicMaskUV: 0 + - _MetallicMaskUVAnimated: 0 + - _MetallicTintMapAnimated: 0 + - _MetallicTintMapPanAnimated: 0 + - _MetallicTintMapUV: 0 + - _MetallicTintMapUVAnimated: 0 + - _Mirror: 0 + - _MirrorAnimated: 0 + - _MirrorTextureAnimated: 0 + - _MirrorTexturePanAnimated: 0 + - _MirrorTextureUV: 0 + - _MirrorTextureUVAnimated: 0 + - _Mode: 8 + - _ModelAngleMax: 90 + - _ModelAngleMaxAnimated: 0 + - _ModelAngleMin: 45 + - _ModelAngleMinAnimated: 0 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetFactorAnimated: 0 + - _OffsetUnits: 0 + - _OffsetUnitsAnimated: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineCullAnimated: 0 + - _OutlineDropShadowOffsetAnimated: 0 + - _OutlineEmission: 0 + - _OutlineEmissionAnimated: 0 + - _OutlineFadeDistanceAnimated: 0 + - _OutlineFixedSize: 0 + - _OutlineFixedSizeAnimated: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineLitAnimated: 0 + - _OutlineMaskAnimated: 0 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineModeAnimated: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlinePersonaDirectionAnimated: 0 + - _OutlineRimLightBlend: 0 + - _OutlineRimLightBlendAnimated: 0 + - _OutlineShadowStrength: 1 + - _OutlineShadowStrengthAnimated: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilCompareFunctionAnimated: 0 + - _OutlineStencilFailOp: 0 + - _OutlineStencilFailOpAnimated: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilPassOpAnimated: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilReadMaskAnimated: 0 + - _OutlineStencilRef: 0 + - _OutlineStencilRefAnimated: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilWriteMaskAnimated: 0 + - _OutlineStencilZFailOp: 0 + - _OutlineStencilZFailOpAnimated: 0 + - _OutlineTextureAnimated: 0 + - _OutlineTexturePanAnimated: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineTintMixAnimated: 0 + - _OutlineUseVertexColors: 0 + - _OutlineUseVertexColorsAnimated: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionMultiplier: 1 + - _PPHelp: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoBlendAnimated: 0 + - _PanoCubeMapAnimated: 0 + - _PanoCubeMapToggle: 0 + - _PanoCubeMapToggleAnimated: 0 + - _PanoEmission: 0 + - _PanoEmissionAnimated: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoInfiniteStereoToggleAnimated: 0 + - _PanoMaskAnimated: 0 + - _PanoMaskPanAnimated: 0 + - _PanoMaskUV: 0 + - _PanoMaskUVAnimated: 0 + - _PanoToggle: 0 + - _PanoToggleAnimated: 0 + - _PanosphereColorAnimated: 0 + - _PanospherePanAnimated: 0 + - _PanosphereTextureAnimated: 0 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxBiasAnimated: 0 + - _ParallaxHeightMapAnimated: 0 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapEnabledAnimated: 0 + - _ParallaxHeightMapMaskAnimated: 0 + - _ParallaxHeightMapMaskPanAnimated: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxHeightMapMaskUVAnimated: 0 + - _ParallaxHeightMapPanAnimated: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightFromAlphaAnimated: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalHeightmapModeAnimated: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalIterationsAnimated: 0 + - _ParallaxInternalMapAnimated: 0 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapEnabledAnimated: 0 + - _ParallaxInternalMapMaskAnimated: 0 + - _ParallaxInternalMapMaskPanAnimated: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMapMaskUVAnimated: 0 + - _ParallaxInternalMaxColorAnimated: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxDepthAnimated: 0 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMaxFadeAnimated: 0 + - _ParallaxInternalMinColorAnimated: 0 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinDepthAnimated: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxInternalMinFadeAnimated: 0 + - _ParallaxInternalPanDepthSpeedAnimated: 0 + - _ParallaxInternalPanSpeedAnimated: 0 + - _ParallaxMap: 0 + - _ParallaxMapAnimated: 0 + - _ParallaxStrength: 0 + - _ParallaxStrengthAnimated: 0 + - _ParallaxUV: 0 + - _ParallaxUVAnimated: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PoiMode: 1 + - _PoiModeAnimated: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlendMultiplicativeAnimated: 0 + - _RGBBluePanningAnimated: 0 + - _RGBBlue_UV: 0 + - _RGBBlue_UVAnimated: 0 + - _RGBGreenPanningAnimated: 0 + - _RGBGreen_UV: 0 + - _RGBGreen_UVAnimated: 0 + - _RGBMaskAnimated: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskEnabledAnimated: 0 + - _RGBMaskPanningAnimated: 0 + - _RGBMaskUV: 0 + - _RGBMaskUVAnimated: 0 + - _RGBNormalBlend: 0 + - _RGBNormalBlendAnimated: 0 + - _RGBRedPanningAnimated: 0 + - _RGBRed_UV: 0 + - _RGBRed_UVAnimated: 0 + - _RGBUseVertexColors: 0 + - _RGBUseVertexColorsAnimated: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorAnimated: 0 + - _RedTexureAnimated: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionChromaticAberattionAnimated: 0 + - _RefractionEnabled: 1 + - _RefractionEnabledAnimated: 0 + - _RefractionIndex: 1.333333 + - _RefractionIndexAnimated: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0.15 + - _RimBrightenAnimated: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroBlurAnimated: 0 + - _RimEnviroIntensity: 1 + - _RimEnviroIntensityAnimated: 0 + - _RimEnviroMaskAnimated: 0 + - _RimEnviroMaskPanAnimated: 0 + - _RimEnviroMaskUV: 0 + - _RimEnviroMaskUVAnimated: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroMinBrightnessAnimated: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroSharpnessAnimated: 0 + - _RimEnviroWidth: 0.45 + - _RimEnviroWidthAnimated: 0 + - _RimHueShift: 0 + - _RimHueShiftAnimated: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftEnabledAnimated: 0 + - _RimHueShiftSpeed: 0 + - _RimHueShiftSpeedAnimated: 0 + - _RimLightColorAnimated: 0 + - _RimLightColorBias: 0 + - _RimLightColorBiasAnimated: 0 + - _RimLightNormal: 1 + - _RimLightNormalAnimated: 0 + - _RimLightingInvert: 0 + - _RimLightingInvertAnimated: 0 + - _RimMaskAnimated: 0 + - _RimMaskPanAnimated: 0 + - _RimMaskUV: 0 + - _RimMaskUVAnimated: 0 + - _RimSharpness: 0.25 + - _RimSharpnessAnimated: 0 + - _RimStrength: 0 + - _RimStrengthAnimated: 0 + - _RimTexAnimated: 0 + - _RimTexPanAnimated: 0 + - _RimTexUV: 0 + - _RimTexUVAnimated: 0 + - _RimWidth: 0.8 + - _RimWidthAnimated: 0 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseStrengthAnimated: 0 + - _RimWidthNoiseTextureAnimated: 0 + - _RimWidthNoiseTexturePanAnimated: 0 + - _RimWidthNoiseTextureUV: 0 + - _RimWidthNoiseTextureUVAnimated: 0 + - _SSSColorAnimated: 0 + - _SSSDistortion: 1 + - _SSSDistortionAnimated: 0 + - _SSSPower: 5 + - _SSSPowerAnimated: 0 + - _SSSSCale: 0.25 + - _SSSSCaleAnimated: 0 + - _SSSThicknessMapAnimated: 0 + - _SSSThicknessMapPanAnimated: 0 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMapUVAnimated: 0 + - _SSSThicknessMod: 0 + - _SSSThicknessModAnimated: 0 + - _SampleWorld: 0 + - _SampleWorldAnimated: 0 + - _Saturation: 0 + - _SaturationAnimated: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission1Animated: 0 + - _ScrollingEmissionAnimated: 0 + - _ShadeColor_Step: 0 + - _ShadeColor_StepAnimated: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixAnimated: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixThresholdAnimated: 0 + - _ShadowMixWidthMod: 0.5 + - _ShadowMixWidthModAnimated: 0 + - _ShadowOffset: 0 + - _ShadowOffset1: 0 + - _ShadowOffset1Animated: 0 + - _ShadowOffset2: 0 + - _ShadowOffset2Animated: 0 + - _ShadowOffsetAnimated: 0 + - _ShadowStrength: 1 + - _ShadowStrengthAnimated: 0 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 1 + - _SmoothnessAnimated: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessFrom1Animated: 0 + - _SmoothnessFromAnimated: 0 + - _SmoothnessMaskAnimated: 0 + - _SmoothnessMaskPanAnimated: 0 + - _SmoothnessMaskUV: 0 + - _SmoothnessMaskUVAnimated: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInAlphaAnimated: 0 + - _SpawnInEmissionColorAnimated: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInEmissionOffsetAnimated: 0 + - _SpawnInGradientFinishAnimated: 0 + - _SpawnInGradientStartAnimated: 0 + - _SpawnInNoiseAnimated: 0 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInNoiseIntensityAnimated: 0 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetAnimated: 0 + - _SpawnInVertOffsetOffset: 0.1 + - _SpawnInVertOffsetOffsetAnimated: 0 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec1Offset1Animated: 0 + - _Spec1OffsetAnimated: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _Spec2Smoothness1Animated: 0 + - _Spec2SmoothnessAnimated: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecWhatTangent1Animated: 0 + - _SpecWhatTangentAnimated: 0 + - _SpecularAnisoJitterMacro1Animated: 0 + - _SpecularAnisoJitterMacro1PanAnimated: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacro1UVAnimated: 0 + - _SpecularAnisoJitterMacroAnimated: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroMultiplier1Animated: 0 + - _SpecularAnisoJitterMacroMultiplierAnimated: 0 + - _SpecularAnisoJitterMacroPanAnimated: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMacroUVAnimated: 0 + - _SpecularAnisoJitterMicro1Animated: 0 + - _SpecularAnisoJitterMicro1PanAnimated: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicro1UVAnimated: 0 + - _SpecularAnisoJitterMicroAnimated: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroMultiplier1Animated: 0 + - _SpecularAnisoJitterMicroMultiplierAnimated: 0 + - _SpecularAnisoJitterMicroPanAnimated: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMicroUVAnimated: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularAnisoJitterMirrored1Animated: 0 + - _SpecularAnisoJitterMirroredAnimated: 0 + - _SpecularAttenuation: 1 + - _SpecularAttenuation1: 1 + - _SpecularAttenuation1Animated: 0 + - _SpecularAttenuationAnimated: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularInvertSmoothness1Animated: 0 + - _SpecularInvertSmoothnessAnimated: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1Animated: 0 + - _SpecularMap1PanAnimated: 0 + - _SpecularMap1UV: 0 + - _SpecularMap1UVAnimated: 0 + - _SpecularMapAnimated: 0 + - _SpecularMapPanAnimated: 0 + - _SpecularMapUV: 0 + - _SpecularMapUVAnimated: 0 + - _SpecularMask1Animated: 0 + - _SpecularMask1PanAnimated: 0 + - _SpecularMask1UV: 0 + - _SpecularMask1UVAnimated: 0 + - _SpecularMaskAnimated: 0 + - _SpecularMaskPanAnimated: 0 + - _SpecularMaskUV: 0 + - _SpecularMaskUVAnimated: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallic1Animated: 0 + - _SpecularMetallicAnimated: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularNormal1Animated: 0 + - _SpecularNormalAnimated: 0 + - _SpecularSmoothness: 0.908 + - _SpecularSmoothness1: 0.75 + - _SpecularSmoothness1Animated: 0 + - _SpecularSmoothnessAnimated: 0 + - _SpecularTint1Animated: 0 + - _SpecularTintAnimated: 0 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonEnd1Animated: 0 + - _SpecularToonEndAnimated: 0 + - _SpecularToonInnerOuter1Animated: 0 + - _SpecularToonInnerOuterAnimated: 0 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularToonStart1Animated: 0 + - _SpecularToonStartAnimated: 0 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SpecularType1Animated: 0 + - _SpecularTypeAnimated: 0 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SrcBlendAnimated: 0 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilCompareFunctionAnimated: 0 + - _StencilFailOp: 0 + - _StencilFailOpAnimated: 0 + - _StencilPassOp: 0 + - _StencilPassOpAnimated: 0 + - _StencilReadMask: 255 + - _StencilReadMaskAnimated: 0 + - _StencilRef: 0 + - _StencilRefAnimated: 0 + - _StencilWriteMask: 255 + - _StencilWriteMaskAnimated: 0 + - _StencilZFailOp: 0 + - _StencilZFailOpAnimated: 0 + - _TextEnabled: 0 + - _TextEnabledAnimated: 0 + - _TextFPSColorAnimated: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEmissionStrengthAnimated: 0 + - _TextFPSEnabled: 0 + - _TextFPSEnabledAnimated: 0 + - _TextFPSOffsetAnimated: 0 + - _TextFPSPaddingAnimated: 0 + - _TextFPSRotation: 0 + - _TextFPSRotationAnimated: 0 + - _TextFPSScaleAnimated: 0 + - _TextFPSUV: 0 + - _TextFPSUVAnimated: 0 + - _TextGlyphsAnimated: 0 + - _TextPixelRange: 4 + - _TextPixelRangeAnimated: 0 + - _TextPositionColorAnimated: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEmissionStrengthAnimated: 0 + - _TextPositionEnabled: 0 + - _TextPositionEnabledAnimated: 0 + - _TextPositionOffsetAnimated: 0 + - _TextPositionPaddingAnimated: 0 + - _TextPositionRotation: 0 + - _TextPositionRotationAnimated: 0 + - _TextPositionScaleAnimated: 0 + - _TextPositionUV: 0 + - _TextPositionUVAnimated: 0 + - _TextTimeColorAnimated: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEmissionStrengthAnimated: 0 + - _TextTimeEnabled: 0 + - _TextTimeEnabledAnimated: 0 + - _TextTimeOffsetAnimated: 0 + - _TextTimePaddingAnimated: 0 + - _TextTimeRotation: 0 + - _TextTimeRotationAnimated: 0 + - _TextTimeScaleAnimated: 0 + - _TextTimeUV: 0 + - _TextTimeUVAnimated: 0 + - _ToonRamp1Animated: 0 + - _ToonRamp2Animated: 0 + - _ToonRampAnimated: 0 + - _UVSec: 0 + - _UseShadowTexture: 0 + - _UseShadowTextureAnimated: 0 + - _Use_1stAs2nd: 0 + - _Use_1stAs2ndAnimated: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_1stShadeMapAlpha_As_ShadowMaskAnimated: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMaskAnimated: 0 + - _Use_BaseAs1st: 0 + - _Use_BaseAs1stAnimated: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchFrequencyAnimated: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchStrengthAnimated: 0 + - _VertexGlitchThreshold: 1 + - _VertexGlitchThresholdAnimated: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightAnimated: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightBiasAnimated: 0 + - _VertexManipulationHeightMaskAnimated: 0 + - _VertexManipulationHeightPanAnimated: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationHeightUVAnimated: 0 + - _VertexManipulationLocalRotationAnimated: 0 + - _VertexManipulationLocalScaleAnimated: 0 + - _VertexManipulationLocalTranslationAnimated: 0 + - _VertexManipulationWorldTranslationAnimated: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingDivisionAnimated: 0 + - _VertexRoundingEnabled: 0 + - _VertexRoundingEnabledAnimated: 0 + - _VertexUnwrap: 0 + - _VertexUnwrapAnimated: 0 + - _VideoBacklight: 1 + - _VideoBacklightAnimated: 0 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTPixelEnergizedTimeAnimated: 0 + - _VideoCRTRefreshRate: 24 + - _VideoCRTRefreshRateAnimated: 0 + - _VideoContrast: 0 + - _VideoContrastAnimated: 0 + - _VideoDebugTextureAnimated: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableDebugAnimated: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoEnableVideoPlayerAnimated: 0 + - _VideoGameboyRampAnimated: 0 + - _VideoMaskPanningAnimated: 0 + - _VideoMaskTextureAnimated: 0 + - _VideoOffsetAnimated: 0 + - _VideoPanningAnimated: 0 + - _VideoPixelTextureAnimated: 0 + - _VideoPixelateToResolution: 0 + - _VideoPixelateToResolutionAnimated: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoRepeatVideoTextureAnimated: 0 + - _VideoResolutionAnimated: 0 + - _VideoSaturation: 0 + - _VideoSaturationAnimated: 0 + - _VideoTilingAnimated: 0 + - _VideoType: 3 + - _VideoTypeAnimated: 0 + - _VideoUVNumber: 0 + - _VideoUVNumberAnimated: 0 + - _VoronoiBlend: 0 + - _VoronoiBlendAnimated: 0 + - _VoronoiColor0Animated: 0 + - _VoronoiColor1Animated: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEffectsMaterialAlphaAnimated: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission0Animated: 0 + - _VoronoiEmission1: 0 + - _VoronoiEmission1Animated: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiEnableRandomCellColorAnimated: 0 + - _VoronoiGradientAnimated: 0 + - _VoronoiMaskAnimated: 0 + - _VoronoiMaskPanAnimated: 0 + - _VoronoiMaskUV: 0 + - _VoronoiMaskUVAnimated: 0 + - _VoronoiNoiseAnimated: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseIntensityAnimated: 0 + - _VoronoiNoisePanAnimated: 0 + - _VoronoiNoiseUV: 0 + - _VoronoiNoiseUVAnimated: 0 + - _VoronoiRandomMinMaxBrightnessAnimated: 0 + - _VoronoiRandomMinMaxSaturationAnimated: 0 + - _VoronoiScale: 5 + - _VoronoiScaleAnimated: 0 + - _VoronoiSpace: 0 + - _VoronoiSpaceAnimated: 0 + - _VoronoiSpeedAnimated: 0 + - _VoronoiType: 1 + - _VoronoiTypeAnimated: 0 + - _Wriggle: 0.28 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZTestAnimated: 0 + - _ZWrite: 1 + - _ZWriteAnimated: 0 + - __dirty: 1 + - _commentIfZero_EnableGrabpass: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _commentIfZero_LightingAdditiveEnableAnimated: 0 + - _glitterFrequencyLinearEmissive: 20 + - _glitterFrequencyLinearEmissiveAnimated: 0 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 1 + - m_PostProcessing: 0 + - m_Special_Effects: 1 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingBeta: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_shadowTexture: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 1 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 1 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 1 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 1 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 1 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 1 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 1 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingBeta: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_shadowTexture: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: -10, a: 10} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: -10, a: 10} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: -1, a: 1} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: -1, a: 1} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.6839622, g: 0.98736686, b: 1, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 2, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingEndColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainDistanceFade: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainHueShiftMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat.meta new file mode 100644 index 00000000..59e1ffa2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Crystal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4e2f5e4165f3b5c4ab37171a4d5bd012 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat new file mode 100644 index 00000000..2c81a13e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat @@ -0,0 +1,1697 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Iridescence + m_Shader: {fileID: 4800000, guid: e9e18fbf88ba9eb44ab0d683cd27c2a3, type: 3} + m_ShaderKeywords: COLOR_GRADING_LOG_VIEW VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 2800000, guid: 446cd9992afb87f45b237154fea5f570, type: 3} + m_Scale: {x: 4, y: 2} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 2800000, guid: 261e4abd57cabfb4ca0de9c4b0fc43dc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: a6d6984545cde4a4f9317b17d6dca225, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 2800000, guid: c0125b075311ac74c93f83b0e6558dc0, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaToMask: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0.777 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0.177 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFReflectance: 0.604 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ContinuousDissolve: 0 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugCameraData: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugMeshData: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMin: 1 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EnableAudioLink: 1 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBlur: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GrabBlurDirections: 4 + - _GrabBlurDistance: 0 + - _GrabBlurQuality: 2 + - _GrabDstBlend: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabSrcBlend: 2 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 1 + - _IridescenceEmissionStrength: 1 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 1 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: -0.24 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 1 + - _IridescenceTime: 0 + - _Length: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientStart: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 1 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 11.67 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _Matcap2Add: 0 + - _Matcap2Border: 0.43 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _MatcapAdd: 0 + - _MatcapBorder: 0.43 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0.004 + - _OutlineHueOffsetSpeed: 5 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionEnabled: 0 + - _RefractionIndex: 1.333333 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _TextEnabled: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _UVSec: 0 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexUnwrap: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableGrabpass: 0 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 1 + - m_Special_Effects: 1 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 1 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 1 + - m_start_IridescenceAudioLink: 1 + - m_start_Lighting: 1 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.4245283, g: 0.4245283, b: 0.4245283, a: 1} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 5, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat.meta new file mode 100644 index 00000000..ffed075c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Iridescence.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8aea42ab850213149843468213b635dd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat new file mode 100644 index 00000000..b0baad5c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat @@ -0,0 +1,1711 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Path 1 + m_Shader: {fileID: 4800000, guid: e9e18fbf88ba9eb44ab0d683cd27c2a3, type: 3} + m_ShaderKeywords: TONEMAPPING_CUSTOM VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: Lit Template_TessellatedGeometry_Lit_Cutout + OriginalShader: ".poiyomi/\u2605 Poiyomi Pro \u2605" + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 2800000, guid: 6b43650e802efd0408625efb2124e574, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 14f9237ca5b8ac04e933d8f136c013cf, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 2800000, guid: 779d3ce26b6b3ec4f98ceddcd13da874, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaToMask: 1 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 1 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.2 + - _AudioLinkAveraging: 1 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 2 + - _AudioLinkPathEmissionAddBandG: 2 + - _AudioLinkPathEmissionAddBandR: 3 + - _AudioLinkPathTimeOffsetBandB: 2 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 2 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ContinuousDissolve: 0 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugCameraData: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugMeshData: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMin: 1 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0 + - _DistortionStrength1: 0 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBlur: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 1 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUseSurfaceColor: 0 + - _GrabBlurDirections: 4 + - _GrabBlurDistance: 0 + - _GrabBlurQuality: 2 + - _GrabDstBlend: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabSrcBlend: 2 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Length: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientStart: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 0 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 1 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTextureUV: 4 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap2Add: 0 + - _Matcap2Border: 0.43 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _MatcapAdd: 0 + - _MatcapBorder: 0.43 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _Mode: 1 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 1 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionAdjust: 0 + - _PPEmissionMultiplier: 1 + - _PPHelp: 0 + - _PPLightingAdjust: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathTypeB: 0 + - _PathTypeG: 2 + - _PathTypeR: 2 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PatreonHelpBox: 0 + - _PenetratorEnabled: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionEnabled: 0 + - _RefractionIndex: 1.333333 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 6 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 20 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _TextEnabled: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 15 + - _VertexGlitchStrength: 10 + - _VertexGlitchThreshold: 0.5 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexUnwrap: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableGrabpass: 0 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _glitterFrequencyLinearEmissive: 20 + - _pathWidthB: 0.225 + - _pathWidthG: 0.14 + - _pathWidthR: 0.08 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 1 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 0 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 1 + - m_start_RGBMask: 0 + - m_start_Refraction: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 1 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 1 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 1 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 5, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 50, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0.29, g: 1, b: 0, a: 0} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0.75, b: 0, a: 0} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0.2, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 0.20392156, g: 1, b: 0.9121384, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 3, a: 1} + - _PathHardness: {r: 0, g: 0, b: 1, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 2, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 0, g: 0.5, b: 1, a: 1} + - _PathSpeed: {r: 20, g: 5, b: 3, a: 1} + - _PathTime: {r: -999, g: -999, b: 0, a: 1} + - _PathWidth: {r: 0.5, g: 0.14285715, b: 0.1, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat.meta new file mode 100644 index 00000000..21f2b355 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path 1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4cd2c6a84cbab204997c5fa27f69ec37 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat new file mode 100644 index 00000000..4467fc26 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat @@ -0,0 +1,1711 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Path + m_Shader: {fileID: 4800000, guid: e9e18fbf88ba9eb44ab0d683cd27c2a3, type: 3} + m_ShaderKeywords: COLOR_GRADING_LOG_VIEW TONEMAPPING_CUSTOM VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: Lit Template_TessellatedGeometry_Lit_Cutout + OriginalShader: ".poiyomi/\u2605 Poiyomi Pro \u2605" + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 2800000, guid: 6b43650e802efd0408625efb2124e574, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 14f9237ca5b8ac04e933d8f136c013cf, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 2800000, guid: ce9509b759e562c429c9d7341b74c88e, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 2800000, guid: 9e8a7632b356c0c448bea2085d3d1fb7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaToMask: 1 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 1 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.2 + - _AudioLinkAveraging: 1 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 2 + - _AudioLinkPathEmissionAddBandG: 2 + - _AudioLinkPathEmissionAddBandR: 3 + - _AudioLinkPathTimeOffsetBandB: 2 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 2 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ContinuousDissolve: 0 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugCameraData: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugMeshData: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMin: 1 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0 + - _DistortionStrength1: 0 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EnableAudioLink: 1 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBlur: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 1 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUseSurfaceColor: 0 + - _GrabBlurDirections: 4 + - _GrabBlurDistance: 0 + - _GrabBlurQuality: 2 + - _GrabDstBlend: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabSrcBlend: 2 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Length: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientStart: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 0 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 1 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTextureUV: 4 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap2Add: 0 + - _Matcap2Border: 0.43 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _MatcapAdd: 0 + - _MatcapBorder: 0.43 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _Mode: 1 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 1 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionAdjust: 0 + - _PPEmissionMultiplier: 1 + - _PPHelp: 0 + - _PPLightingAdjust: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathTypeB: 0 + - _PathTypeG: 2 + - _PathTypeR: 2 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PatreonHelpBox: 0 + - _PenetratorEnabled: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionEnabled: 0 + - _RefractionIndex: 1.333333 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 6 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 20 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _TextEnabled: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 15 + - _VertexGlitchStrength: 10 + - _VertexGlitchThreshold: 0.5 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexUnwrap: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableGrabpass: 0 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _glitterFrequencyLinearEmissive: 20 + - _pathWidthB: 0.225 + - _pathWidthG: 0.14 + - _pathWidthR: 0.08 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 1 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 0 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 1 + - m_start_RGBMask: 0 + - m_start_Refraction: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 1 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 1 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 5, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 50, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0.29, g: 1, b: 0, a: 0} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0.75, b: 0, a: 0} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0.2, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 0.20392156, g: 1, b: 0.9121384, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 3, a: 1} + - _PathHardness: {r: 0, g: 0, b: 1, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 2, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 0, g: 0.5, b: 1, a: 1} + - _PathSpeed: {r: 20, g: 5, b: 3, a: 1} + - _PathTime: {r: -999, g: -999, b: 0, a: 1} + - _PathWidth: {r: 0.5, g: 0.14285715, b: 0.1, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat.meta new file mode 100644 index 00000000..7406eb1c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Path.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f9961bd9c713b24b93109c9af991026 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat new file mode 100644 index 00000000..1801d4a3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat @@ -0,0 +1,2646 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Slime + m_Shader: {fileID: 4800000, guid: 8c9fa15670553cb43b993d5f5df2bf53, type: 3} + m_ShaderKeywords: BLOOM_LOW _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + _SPECGLOSSMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: M_Poiyomi_Slime-194ba681 + OriginalShader: ".poiyomi/\u2605 Poiyomi Pro \u2605" + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 2800000, guid: b8960a088bdbdad478c88078ffab9d8c, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 2800000, guid: b8960a088bdbdad478c88078ffab9d8c, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 2800000, guid: 07f0a54a3a4e7754eabc8ced70d7b30c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 2800000, guid: 07f0a54a3a4e7754eabc8ced70d7b30c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainHueShiftMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: a6d6984545cde4a4f9317b17d6dca225, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1st2nd_Shades_FeatherAnimated: 0 + - _1stShadeMapMask_Inverse: 0 + - _1stShadeMapMask_InverseAnimated: 0 + - _1st_ShadeColorAnimated: 0 + - _1st_ShadeMapAnimated: 0 + - _1st_ShadeMapPanAnimated: 0 + - _1st_ShadeMapUV: 0 + - _1st_ShadeMapUVAnimated: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2ndShadeMapMask_InverseAnimated: 0 + - _2nd_ShadeColorAnimated: 0 + - _2nd_ShadeMapAnimated: 0 + - _2nd_ShadeMapPanAnimated: 0 + - _2nd_ShadeMapUV: 0 + - _2nd_ShadeMapUVAnimated: 0 + - _AOStrength: 0 + - _AOStrengthAnimated: 0 + - _AlphaMaskAnimated: 0 + - _AlphaMaskPanAnimated: 0 + - _AlphaMaskUV: 0 + - _AlphaMaskUVAnimated: 0 + - _AlphaMod: 0 + - _AlphaModAnimated: 0 + - _AlphaPremultiply: 0 + - _AlphaPremultiplyAnimated: 0 + - _AlphaToMask: 0 + - _AlphaToMaskAnimated: 0 + - _AngleCompareTo: 0 + - _AngleCompareToAnimated: 0 + - _AngleForwardDirectionAnimated: 0 + - _AngleMinAlpha: 0 + - _AngleMinAlphaAnimated: 0 + - _AngleType: 0 + - _AngleTypeAnimated: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec1Alpha1Animated: 0 + - _AnisoSpec1AlphaAnimated: 0 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoSpec2Alpha1Animated: 0 + - _AnisoSpec2AlphaAnimated: 0 + - _AnisoTangentMap1Animated: 0 + - _AnisoTangentMap1PanAnimated: 0 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMap1UVAnimated: 0 + - _AnisoTangentMapAnimated: 0 + - _AnisoTangentMapPanAnimated: 0 + - _AnisoTangentMapUV: 0 + - _AnisoTangentMapUVAnimated: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AnisoUseTangentMap1Animated: 0 + - _AnisoUseTangentMapAnimated: 0 + - _AttenuationMultiplier: 0 + - _AttenuationMultiplierAnimated: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFAnisotropyAnimated: 0 + - _BRDFFallbackAnimated: 0 + - _BRDFForceFallback: 0 + - _BRDFForceFallbackAnimated: 0 + - _BRDFGlossiness: 0 + - _BRDFGlossinessAnimated: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFInvertGlossinessAnimated: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicAnimated: 0 + - _BRDFMetallicGlossMapAnimated: 0 + - _BRDFMetallicGlossMapPanAnimated: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapToolTipAnimated: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicGlossMapUVAnimated: 0 + - _BRDFMetallicMapAnimated: 0 + - _BRDFMetallicMapPanAnimated: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapToolTipAnimated: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicMapUVAnimated: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectanceAnimated: 0 + - _BRDFReflectionsEnabled: 1 + - _BRDFReflectionsEnabledAnimated: 0 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularEnabledAnimated: 0 + - _BRDFSpecularMapAnimated: 0 + - _BRDFSpecularMapPanAnimated: 0 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapToolTipAnimated: 0 + - _BRDFSpecularMapUV: 0 + - _BRDFSpecularMapUVAnimated: 0 + - _BackFaceColorAnimated: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceDetailIntensityAnimated: 0 + - _BackFaceEmissionStrength: 0 + - _BackFaceEmissionStrengthAnimated: 0 + - _BackFaceEnabled: 0 + - _BackFaceEnabledAnimated: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftAnimated: 0 + - _BackFacePanningAnimated: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureAnimated: 0 + - _BackFaceTextureUV: 0 + - _BackFaceTextureUVAnimated: 0 + - _BaseColor_Step: 0.5 + - _BaseColor_StepAnimated: 0 + - _BaseShade_Feather: 0.0001 + - _BaseShade_FeatherAnimated: 0 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskClearCoatAnimated: 0 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDebugAnimated: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskDissolveAnimated: 0 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEmission2Animated: 0 + - _BlackLightMaskEmissionAnimated: 0 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskEnabledAnimated: 0 + - _BlackLightMaskEndAnimated: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskFlipbookAnimated: 0 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskGlitterAnimated: 0 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskIridescenceAnimated: 0 + - _BlackLightMaskKeysAnimated: 0 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMatcap2Animated: 0 + - _BlackLightMaskMatcapAnimated: 0 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskMetallicAnimated: 0 + - _BlackLightMaskPanosphere: 4 + - _BlackLightMaskPanosphereAnimated: 0 + - _BlackLightMaskStartAnimated: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendOpAlphaAnimated: 0 + - _BlendOpAnimated: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorAnimated: 0 + - _BlueTextureAnimated: 0 + - _BuldgeFadeLength: 0.2 + - _BuldgeFadeLengthAnimated: 0 + - _BuldgeHeight: 0.2 + - _BuldgeHeightAnimated: 0 + - _BulgeMaskAnimated: 0 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapAnimated: 0 + - _BumpMapPanAnimated: 0 + - _BumpMapUV: 0 + - _BumpMapUVAnimated: 0 + - _BumpScale: 0.1 + - _BumpScaleAnimated: 0 + - _CameraAngleMax: 90 + - _CameraAngleMaxAnimated: 0 + - _CameraAngleMin: 45 + - _CameraAngleMinAnimated: 0 + - _ClearCoat: 1 + - _ClearCoatAnimated: 0 + - _ClearCoatCubeMapAnimated: 0 + - _ClearCoatForceLighting: 0 + - _ClearCoatForceLightingAnimated: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatInvertSmoothnessAnimated: 0 + - _ClearCoatMaskAnimated: 0 + - _ClearCoatMaskPanAnimated: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatMaskUVAnimated: 0 + - _ClearCoatNormalToUse: 0 + - _ClearCoatNormalToUseAnimated: 0 + - _ClearCoatSampleWorld: 0 + - _ClearCoatSampleWorldAnimated: 0 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessAnimated: 0 + - _ClearCoatSmoothnessMapAnimated: 0 + - _ClearCoatSmoothnessMapPanAnimated: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatSmoothnessMapUVAnimated: 0 + - _ClearCoatTintAnimated: 0 + - _Clearcoat: 1 + - _ClearcoatAnimated: 0 + - _ClearcoatAnisotropy: 0 + - _ClearcoatAnisotropyAnimated: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableReflectionsAnimated: 0 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatEnableSpecularAnimated: 0 + - _ClearcoatFallbackAnimated: 0 + - _ClearcoatForceFallback: 0 + - _ClearcoatForceFallbackAnimated: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatGlossinessAnimated: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatInvertSmoothnessAnimated: 0 + - _ClearcoatMapAnimated: 0 + - _ClearcoatMapPanAnimated: 0 + - _ClearcoatMapUV: 0 + - _ClearcoatMapUVAnimated: 0 + - _ClippingMaskAnimated: 0 + - _ClippingMaskPanAnimated: 0 + - _ClippingMaskUV: 0 + - _ClippingMaskUVAnimated: 0 + - _ColorAnimated: 0 + - _ColorMask: 15 + - _ColorMaskAnimated: 0 + - _ContinuousDissolve: 0 + - _ContinuousDissolveAnimated: 0 + - _CubeMapAnimated: 0 + - _Cull: 2 + - _CullAnimated: 0 + - _Curvature: 0 + - _Cutoff: 0 + - _CutoffAnimated: 0 + - _DebugCameraData: 0 + - _DebugCameraDataAnimated: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugLightingDataAnimated: 0 + - _DebugMeshData: 0 + - _DebugMeshDataAnimated: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAdd: 0 + - _DecalBlendAddAnimated: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendAlphaAnimated: 0 + - _DecalBlendMultiply: 0 + - _DecalBlendMultiplyAnimated: 0 + - _DecalBlendReplace: 0 + - _DecalBlendReplaceAnimated: 0 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalBlendTypeAnimated: 0 + - _DecalColorAnimated: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEmissionStrengthAnimated: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalEnabledAnimated: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftAnimated: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftEnabledAnimated: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalHueShiftSpeedAnimated: 0 + - _DecalMaskAnimated: 0 + - _DecalMaskPanAnimated: 0 + - _DecalMaskUV: 0 + - _DecalMaskUVAnimated: 0 + - _DecalPositionAnimated: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationAnimated: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalRotationSpeedAnimated: 0 + - _DecalScaleAnimated: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureAnimated: 0 + - _DecalTexturePanAnimated: 0 + - _DecalTextureUV: 0 + - _DecalTextureUVAnimated: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DecalTiledAnimated: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxAnimated: 0 + - _DepthAlphaMin: 1 + - _DepthAlphaMinAnimated: 0 + - _DepthGlowColorAnimated: 0 + - _DepthGlowEmission: 3 + - _DepthGlowEmissionAnimated: 0 + - _DepthGradientAnimated: 0 + - _DepthGradientBlend: 0 + - _DepthGradientBlendAnimated: 0 + - _DepthGradientPanAnimated: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientTextureUVAnimated: 0 + - _DepthGradientUV: 0 + - _DepthGradientUVAnimated: 0 + - _DepthMaskAnimated: 0 + - _DepthMaskPanAnimated: 0 + - _DepthMaskUV: 0 + - _DepthMaskUVAnimated: 0 + - _DetailBrightness: 1 + - _DetailBrightnessAnimated: 0 + - _DetailEnabled: 0 + - _DetailMaskAnimated: 0 + - _DetailMaskPanAnimated: 0 + - _DetailMaskUV: 0 + - _DetailMaskUVAnimated: 0 + - _DetailNormalMapAnimated: 0 + - _DetailNormalMapPanAnimated: 0 + - _DetailNormalMapScale: 0.1 + - _DetailNormalMapScaleAnimated: 0 + - _DetailNormalMapUV: 0 + - _DetailNormalMapUVAnimated: 0 + - _DetailTexAnimated: 0 + - _DetailTexIntensity: 1 + - _DetailTexIntensityAnimated: 0 + - _DetailTexPanAnimated: 0 + - _DetailTexUV: 0 + - _DetailTexUVAnimated: 0 + - _DetailTintAnimated: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha0Animated: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha1Animated: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha2Animated: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha3Animated: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha4Animated: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha5Animated: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha6Animated: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha7Animated: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha8Animated: 0 + - _DissolveAlpha9: 0 + - _DissolveAlpha9Animated: 0 + - _DissolveAlphaAnimated: 0 + - _DissolveDetailNoiseAnimated: 0 + - _DissolveDetailNoisePanAnimated: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailNoiseUVAnimated: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveDetailStrengthAnimated: 0 + - _DissolveEdgeColorAnimated: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeEmissionAnimated: 0 + - _DissolveEdgeGradientAnimated: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHardnessAnimated: 0 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftAnimated: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftEnabledAnimated: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeHueShiftSpeedAnimated: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEdgeWidthAnimated: 0 + - _DissolveEmission1Side: 2 + - _DissolveEmission1SideAnimated: 0 + - _DissolveEmissionSide: 2 + - _DissolveEmissionSideAnimated: 0 + - _DissolveEndPointAnimated: 0 + - _DissolveHueShift: 0 + - _DissolveHueShiftAnimated: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftEnabledAnimated: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveHueShiftSpeedAnimated: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertDetailNoiseAnimated: 0 + - _DissolveInvertNoise: 0 + - _DissolveInvertNoiseAnimated: 0 + - _DissolveMaskAnimated: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskInvertAnimated: 0 + - _DissolveMaskPanAnimated: 0 + - _DissolveMaskUV: 0 + - _DissolveMaskUVAnimated: 0 + - _DissolveNoiseTextureAnimated: 0 + - _DissolveNoiseTexturePanAnimated: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveNoiseTextureUVAnimated: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PEdgeLengthAnimated: 0 + - _DissolveP2PWorldLocal: 0 + - _DissolveP2PWorldLocalAnimated: 0 + - _DissolveStartPointAnimated: 0 + - _DissolveTextureColorAnimated: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToEmissionStrengthAnimated: 0 + - _DissolveToTextureAnimated: 0 + - _DissolveToTexturePanAnimated: 0 + - _DissolveToTextureUV: 0 + - _DissolveToTextureUVAnimated: 0 + - _DissolveType: 1 + - _DissolveTypeAnimated: 0 + - _DissolveUseVertexColors: 0 + - _DissolveUseVertexColorsAnimated: 0 + - _DistortionFlowTexture1Animated: 0 + - _DistortionFlowTextureAnimated: 0 + - _DistortionMaskAnimated: 0 + - _DistortionMaskPanAnimated: 0 + - _DistortionMaskUV: 0 + - _DistortionMaskUVAnimated: 0 + - _DistortionSpeed1Animated: 0 + - _DistortionSpeedAnimated: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1Animated: 0 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAnimated: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DitherGradient: 0.1 + - _DitherGradientAnimated: 0 + - _DitheringEnabled: 0 + - _DitheringEnabledAnimated: 0 + - _DstBlend: 0 + - _DstBlendAnimated: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap1Animated: 0 + - _EmissionBaseColorAsMapAnimated: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabledAnimated: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset1Animated: 0 + - _EmissionBlinkingOffsetAnimated: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled1Animated: 0 + - _EmissionCenterOutEnabledAnimated: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed1Animated: 0 + - _EmissionCenterOutSpeedAnimated: 0 + - _EmissionColor1Animated: 0 + - _EmissionColorAnimated: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift1Animated: 0 + - _EmissionHueShiftAnimated: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled1Animated: 0 + - _EmissionHueShiftEnabledAnimated: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionMap1Animated: 0 + - _EmissionMap1PanAnimated: 0 + - _EmissionMap1UV: 0 + - _EmissionMap1UVAnimated: 0 + - _EmissionMapAnimated: 0 + - _EmissionMapPanAnimated: 0 + - _EmissionMapUV: 0 + - _EmissionMapUVAnimated: 0 + - _EmissionMask1Animated: 0 + - _EmissionMask1PanAnimated: 0 + - _EmissionMask1UV: 0 + - _EmissionMask1UVAnimated: 0 + - _EmissionMaskAnimated: 0 + - _EmissionMaskPanAnimated: 0 + - _EmissionMaskUV: 0 + - _EmissionMaskUVAnimated: 0 + - _EmissionReplace: 0 + - _EmissionReplaceAnimated: 0 + - _EmissionScrollingCurve1Animated: 0 + - _EmissionScrollingCurveAnimated: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingOffset1Animated: 0 + - _EmissionScrollingOffsetAnimated: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve1Animated: 0 + - _EmissionScrollingUseCurveAnimated: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor1Animated: 0 + - _EmissionScrollingVertexColorAnimated: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength1Animated: 0 + - _EmissionStrengthAnimated: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max1Animated: 0 + - _EmissiveBlink_MaxAnimated: 0 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min1Animated: 0 + - _EmissiveBlink_MinAnimated: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity1Animated: 0 + - _EmissiveBlink_VelocityAnimated: 0 + - _EmissiveScroll_Direction1Animated: 0 + - _EmissiveScroll_DirectionAnimated: 0 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval1Animated: 0 + - _EmissiveScroll_IntervalAnimated: 0 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity1Animated: 0 + - _EmissiveScroll_VelocityAnimated: 0 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width1Animated: 0 + - _EmissiveScroll_WidthAnimated: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBlur: 0 + - _EnableBlurAnimated: 0 + - _EnableBulge: 1 + - _EnableBulgeAnimated: 0 + - _EnableClearCoat: 0 + - _EnableClearCoatAnimated: 0 + - _EnableDissolve: 0 + - _EnableDissolveAnimated: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAnimated: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1Animated: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmissionAnimated: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableEnvironmentalRimAnimated: 0 + - _EnableFlipbook: 0 + - _EnableFlipbookAnimated: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission1Animated: 0 + - _EnableGITDEmissionAnimated: 0 + - _EnableHolo: 0 + - _EnableHoloAnimated: 0 + - _EnableIridescence: 0 + - _EnableIridescenceAnimated: 0 + - _EnableLighting: 0 + - _EnableLightingAnimated: 0 + - _EnableMetallic: 1 + - _EnableMetallicAnimated: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorOptionsAnimated: 0 + - _EnableMirrorTexture: 0 + - _EnableMirrorTextureAnimated: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRandomAnimated: 0 + - _EnableRimLighting: 1 + - _EnableRimLightingAnimated: 0 + - _EnableSSS: 0 + - _EnableSSSAnimated: 0 + - _EnableScifiSpawnIn: 0 + - _EnableScifiSpawnInAnimated: 0 + - _EnableSpecular: 1 + - _EnableSpecular1: 0 + - _EnableSpecular1Animated: 0 + - _EnableSpecularAnimated: 0 + - _EnableTouchGlow: 0 + - _EnableTouchGlowAnimated: 0 + - _EnableVertexGlitch: 0 + - _EnableVertexGlitchAnimated: 0 + - _EnableVideo: 0 + - _EnableVideoAnimated: 0 + - _EnableVoronoi: 0 + - _EnableVoronoiAnimated: 0 + - _EntranceStiffness: 0 + - _EntryOpenDuration: 0.1 + - _FadeLength: 0.02 + - _FadeLengthAnimated: 0 + - _FlipbookAdd: 0 + - _FlipbookAddAnimated: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookAlphaControlsFinalAlphaAnimated: 0 + - _FlipbookColorAnimated: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookColorReplacesAnimated: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCrossfadeEnabledAnimated: 0 + - _FlipbookCrossfadeRangeAnimated: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookCurrentFrameAnimated: 0 + - _FlipbookEmissionStrength: 0 + - _FlipbookEmissionStrengthAnimated: 0 + - _FlipbookFPS: 30 + - _FlipbookFPSAnimated: 0 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftAnimated: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftEnabledAnimated: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookHueShiftSpeedAnimated: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookIntensityControlsAlphaAnimated: 0 + - _FlipbookMaskAnimated: 0 + - _FlipbookMaskPanAnimated: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMaskUVAnimated: 0 + - _FlipbookMultiply: 0 + - _FlipbookMultiplyAnimated: 0 + - _FlipbookReplace: 1 + - _FlipbookReplaceAnimated: 0 + - _FlipbookRotation: 0 + - _FlipbookRotationAnimated: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookRotationSpeedAnimated: 0 + - _FlipbookScaleOffsetAnimated: 0 + - _FlipbookTexArrayAnimated: 0 + - _FlipbookTexArrayPanAnimated: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTexArrayUVAnimated: 0 + - _FlipbookTiled: 0 + - _FlipbookTiledAnimated: 0 + - _FlipbookTotalFrames: 1 + - _FlipbookTotalFramesAnimated: 0 + - _ForceOpaque: 0 + - _ForceOpaqueAnimated: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier1Animated: 0 + - _GITDEMaxEmissionMultiplierAnimated: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight1Animated: 0 + - _GITDEMaxLightAnimated: 0 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier1Animated: 0 + - _GITDEMinEmissionMultiplierAnimated: 0 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight1Animated: 0 + - _GITDEMinLightAnimated: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh1Animated: 0 + - _GITDEWorldOrMeshAnimated: 0 + - _GlitterAngleRange: 90 + - _GlitterAngleRangeAnimated: 0 + - _GlitterBias: 0.8 + - _GlitterBiasAnimated: 0 + - _GlitterBlendType: 0 + - _GlitterBlendTypeAnimated: 0 + - _GlitterBrightness: 3 + - _GlitterBrightnessAnimated: 0 + - _GlitterCenterSize: 0.08 + - _GlitterCenterSizeAnimated: 0 + - _GlitterColorAnimated: 0 + - _GlitterColorMapAnimated: 0 + - _GlitterColorMapPanAnimated: 0 + - _GlitterColorMapUV: 0 + - _GlitterColorMapUVAnimated: 0 + - _GlitterContrast: 300 + - _GlitterContrastAnimated: 0 + - _GlitterEnable: 0 + - _GlitterEnableAnimated: 0 + - _GlitterFrequency: 300 + - _GlitterFrequencyAnimated: 0 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftAnimated: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftEnabledAnimated: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterHueShiftSpeedAnimated: 0 + - _GlitterJaggyFix: 0 + - _GlitterJaggyFixAnimated: 0 + - _GlitterJitter: 1 + - _GlitterJitterAnimated: 0 + - _GlitterMaskAnimated: 0 + - _GlitterMaskPanAnimated: 0 + - _GlitterMaskUV: 0 + - _GlitterMaskUVAnimated: 0 + - _GlitterMinBrightness: 0 + - _GlitterMinBrightnessAnimated: 0 + - _GlitterMinMaxBrightnessAnimated: 0 + - _GlitterMinMaxSaturationAnimated: 0 + - _GlitterMinMaxSizeAnimated: 0 + - _GlitterMode: 0 + - _GlitterModeAnimated: 0 + - _GlitterPanAnimated: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomColorsAnimated: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomRotationAnimated: 0 + - _GlitterRandomSize: 0 + - _GlitterRandomSizeAnimated: 0 + - _GlitterShape: 0 + - _GlitterShapeAnimated: 0 + - _GlitterSize: 0.3 + - _GlitterSizeAnimated: 0 + - _GlitterSpeed: 10 + - _GlitterSpeedAnimated: 0 + - _GlitterTextureAnimated: 0 + - _GlitterTexturePanAnimated: 0 + - _GlitterTextureRotation: 0 + - _GlitterTextureRotationAnimated: 0 + - _GlitterUseSurfaceColor: 0 + - _GlitterUseSurfaceColorAnimated: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GrabBlurDirections: 4 + - _GrabBlurDirectionsAnimated: 0 + - _GrabBlurDistance: 0 + - _GrabBlurDistanceAnimated: 0 + - _GrabBlurQuality: 2 + - _GrabBlurQualityAnimated: 0 + - _GrabDstBlend: 0 + - _GrabDstBlendAnimated: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendFactorAnimated: 0 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabPassUseAlphaAnimated: 0 + - _GrabSrcBlend: 2 + - _GrabSrcBlendAnimated: 0 + - _GreenColorAnimated: 0 + - _GreenTextureAnimated: 0 + - _HoloAlphaMapAnimated: 0 + - _HoloCoordinateSpace: 0 + - _HoloCoordinateSpaceAnimated: 0 + - _HoloDirectionAnimated: 0 + - _HoloFresnelAlpha: 0 + - _HoloFresnelAlphaAnimated: 0 + - _HoloLineDensity: 10 + - _HoloLineDensityAnimated: 0 + - _HoloRimSharpness: 0.5 + - _HoloRimSharpnessAnimated: 0 + - _HoloRimWidth: 0.5 + - _HoloRimWidthAnimated: 0 + - _HoloScrollSpeed: 1 + - _HoloScrollSpeedAnimated: 0 + - _IgnoreFog: 0 + - _IgnoreFogAnimated: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _InvertSmoothnessAnimated: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAddBlendAnimated: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceEmissionStrengthAnimated: 0 + - _IridescenceIntensity: 1 + - _IridescenceIntensityAnimated: 0 + - _IridescenceMaskAnimated: 0 + - _IridescenceMaskUV: 0 + - _IridescenceMaskUVAnimated: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceMultiplyBlendAnimated: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalIntensityAnimated: 0 + - _IridescenceNormalMapAnimated: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalSelectionAnimated: 0 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalToggleAnimated: 0 + - _IridescenceNormalUV: 0 + - _IridescenceNormalUVAnimated: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceRampAnimated: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceReplaceBlendAnimated: 0 + - _IridescenceTime: 0 + - _IridescenceTimeAnimated: 0 + - _Length: 0 + - _LightingAOTexAnimated: 0 + - _LightingAOTexPanAnimated: 0 + - _LightingAOTexUV: 0 + - _LightingAOTexUVAnimated: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveDetailStrengthAnimated: 0 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientEndAnimated: 0 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveGradientStartAnimated: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimitIntensityAnimated: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMaxIntensityAnimated: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditivePassthroughAnimated: 0 + - _LightingAdditiveType: 1 + - _LightingAdditiveTypeAnimated: 0 + - _LightingDetailShadowsAnimated: 0 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsEnabledAnimated: 0 + - _LightingDetailShadowsPanAnimated: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailShadowsUVAnimated: 0 + - _LightingDetailStrength: 1 + - _LightingDetailStrengthAnimated: 0 + - _LightingDirectColorMode: 0 + - _LightingDirectColorModeAnimated: 0 + - _LightingEnableAO: 0 + - _LightingEnableAOAnimated: 0 + - _LightingEnableHSL: 0 + - _LightingEnableHSLAnimated: 0 + - _LightingEndColorAnimated: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndAnimated: 0 + - _LightingGradientStart: 0 + - _LightingGradientStartAnimated: 0 + - _LightingHSLIntensity: 1 + - _LightingHSLIntensityAnimated: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIgnoreAmbientColorAnimated: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectColorModeAnimated: 0 + - _LightingIndirectContribution: 0.2 + - _LightingIndirectContributionAnimated: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightBrightnessAnimated: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMinShadowBrightnessRatioAnimated: 0 + - _LightingMode: 0 + - _LightingModeAnimated: 0 + - _LightingMonochromatic: 0 + - _LightingMonochromaticAnimated: 0 + - _LightingNoIndirectMultiplier: 0.5 + - _LightingNoIndirectMultiplierAnimated: 0 + - _LightingNoIndirectThreshold: 0.01 + - _LightingNoIndirectThresholdAnimated: 0 + - _LightingNumRamps: 1 + - _LightingNumRampsAnimated: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingOnlyUnityShadowsAnimated: 0 + - _LightingRampType: 0 + - _LightingRampTypeAnimated: 0 + - _LightingShadingEnabled: 0 + - _LightingShadingEnabledAnimated: 0 + - _LightingShadowColorAnimated: 0 + - _LightingShadowHuAnimatede: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowHueAnimated: 0 + - _LightingShadowLightness: 0.5 + - _LightingShadowLightnessAnimated: 0 + - _LightingShadowMaskAnimated: 0 + - _LightingShadowMaskPanAnimated: 0 + - _LightingShadowMaskUV: 0 + - _LightingShadowMaskUVAnimated: 0 + - _LightingShadowSaturation: 0.5 + - _LightingShadowSaturationAnimated: 0 + - _LightingShadowStrength1: 1 + - _LightingShadowStrength1Animated: 0 + - _LightingShadowStrength2: 1 + - _LightingShadowStrength2Animated: 0 + - _LightingShadowTextureAnimated: 0 + - _LightingShadowTexturePanAnimated: 0 + - _LightingShadowTextureUV: 0 + - _LightingShadowTextureUVAnimated: 0 + - _LightingStandardControlsToon: 0 + - _LightingStandardControlsToonAnimated: 0 + - _LightingStandardSmoothness: 0 + - _LightingStandardSmoothnessAnimated: 0 + - _LightingType: 0 + - _LightingTypeAnimated: 0 + - _LightingUncapped: 0 + - _LightingUncappedAnimated: 0 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineColorAnimated: 0 + - _LineWidth: 0 + - _LineWidthAnimated: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainAlphaToCoverageAnimated: 0 + - _MainBrightness: 0 + - _MainBrightnessAnimated: 0 + - _MainColorAdjustTextureAnimated: 0 + - _MainColorAdjustTexturePanAnimated: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustTextureUVAnimated: 0 + - _MainDistanceFadeAnimated: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainEmissionStrengthAnimated: 0 + - _MainFadeTextureAnimated: 0 + - _MainFadeTexturePanAnimated: 0 + - _MainFadeTextureUV: 0 + - _MainFadeTextureUVAnimated: 0 + - _MainHueShift: 0 + - _MainHueShiftAnimated: 0 + - _MainHueShiftMaskAnimated: 0 + - _MainHueShiftMaskPanAnimated: 0 + - _MainHueShiftMaskUV: 0 + - _MainHueShiftMaskUVAnimated: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftReplaceAnimated: 0 + - _MainHueShiftSpeed: 0 + - _MainHueShiftSpeedAnimated: 0 + - _MainHueShiftToggle: 0 + - _MainHueShiftToggleAnimated: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMinAlphaAnimated: 0 + - _MainMipScale: 0.25 + - _MainMipScaleAnimated: 0 + - _MainShadowClipMod: 0 + - _MainShadowClipModAnimated: 0 + - _MainTexAnimated: 0 + - _MainTexPanAnimated: 0 + - _MainTex_STAnimated: 0 + - _MainTextureUV: 0 + - _MainTextureUVAnimated: 0 + - _MainUseVertexColorAlpha: 0 + - _MainUseVertexColorAlphaAnimated: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringAnimated: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap2Add: 0 + - _Matcap2AddAnimated: 0 + - _Matcap2Animated: 0 + - _Matcap2Border: 0.43 + - _Matcap2BorderAnimated: 0 + - _Matcap2ColorAnimated: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2EmissionStrengthAnimated: 0 + - _Matcap2Enable: 0 + - _Matcap2EnableAnimated: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftAnimated: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftEnabledAnimated: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2HueShiftSpeedAnimated: 0 + - _Matcap2Intensity: 1 + - _Matcap2IntensityAnimated: 0 + - _Matcap2LightMask: 0 + - _Matcap2LightMaskAnimated: 0 + - _Matcap2MaskAnimated: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskInvertAnimated: 0 + - _Matcap2MaskPanAnimated: 0 + - _Matcap2MaskUV: 0 + - _Matcap2MaskUVAnimated: 0 + - _Matcap2Multiply: 0 + - _Matcap2MultiplyAnimated: 0 + - _Matcap2Normal: 1 + - _Matcap2NormalAnimated: 0 + - _Matcap2Replace: 0 + - _Matcap2ReplaceAnimated: 0 + - _MatcapAdd: 0 + - _MatcapAddAnimated: 0 + - _MatcapAnimated: 0 + - _MatcapBorder: 0.43 + - _MatcapBorderAnimated: 0 + - _MatcapColorAnimated: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEmissionStrengthAnimated: 0 + - _MatcapEnable: 0 + - _MatcapEnableAnimated: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftAnimated: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftEnabledAnimated: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapHueShiftSpeedAnimated: 0 + - _MatcapIntensity: 1 + - _MatcapIntensityAnimated: 0 + - _MatcapLightMask: 0 + - _MatcapLightMaskAnimated: 0 + - _MatcapMaskAnimated: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskInvertAnimated: 0 + - _MatcapMaskPanAnimated: 0 + - _MatcapMaskUV: 0 + - _MatcapMaskUVAnimated: 0 + - _MatcapMultiply: 0 + - _MatcapMultiplyAnimated: 0 + - _MatcapNormal: 1 + - _MatcapNormalAnimated: 0 + - _MatcapReplace: 1 + - _MatcapReplaceAnimated: 0 + - _MetalReflectionTintAnimated: 0 + - _Metallic: 0 + - _MetallicAnimated: 0 + - _MetallicMaskAnimated: 0 + - _MetallicMaskPanAnimated: 0 + - _MetallicMaskUV: 0 + - _MetallicMaskUVAnimated: 0 + - _MetallicTintMapAnimated: 0 + - _MetallicTintMapPanAnimated: 0 + - _MetallicTintMapUV: 0 + - _MetallicTintMapUVAnimated: 0 + - _Mirror: 0 + - _MirrorAnimated: 0 + - _MirrorTextureAnimated: 0 + - _MirrorTexturePanAnimated: 0 + - _MirrorTextureUV: 0 + - _MirrorTextureUVAnimated: 0 + - _Mode: 8 + - _ModelAngleMax: 90 + - _ModelAngleMaxAnimated: 0 + - _ModelAngleMin: 45 + - _ModelAngleMinAnimated: 0 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetFactorAnimated: 0 + - _OffsetUnits: 0 + - _OffsetUnitsAnimated: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineCullAnimated: 0 + - _OutlineDropShadowOffsetAnimated: 0 + - _OutlineEmission: 0 + - _OutlineEmissionAnimated: 0 + - _OutlineFadeDistanceAnimated: 0 + - _OutlineFixedSize: 0 + - _OutlineFixedSizeAnimated: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineLitAnimated: 0 + - _OutlineMaskAnimated: 0 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineModeAnimated: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlinePersonaDirectionAnimated: 0 + - _OutlineRimLightBlend: 0 + - _OutlineRimLightBlendAnimated: 0 + - _OutlineShadowStrength: 1 + - _OutlineShadowStrengthAnimated: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilCompareFunctionAnimated: 0 + - _OutlineStencilFailOp: 0 + - _OutlineStencilFailOpAnimated: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilPassOpAnimated: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilReadMaskAnimated: 0 + - _OutlineStencilRef: 0 + - _OutlineStencilRefAnimated: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilWriteMaskAnimated: 0 + - _OutlineStencilZFailOp: 0 + - _OutlineStencilZFailOpAnimated: 0 + - _OutlineTextureAnimated: 0 + - _OutlineTexturePanAnimated: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineTintMixAnimated: 0 + - _OutlineUseVertexColors: 0 + - _OutlineUseVertexColorsAnimated: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionMultiplier: 1 + - _PPHelp: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoBlendAnimated: 0 + - _PanoCubeMapAnimated: 0 + - _PanoCubeMapToggle: 0 + - _PanoCubeMapToggleAnimated: 0 + - _PanoEmission: 0 + - _PanoEmissionAnimated: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoInfiniteStereoToggleAnimated: 0 + - _PanoMaskAnimated: 0 + - _PanoMaskPanAnimated: 0 + - _PanoMaskUV: 0 + - _PanoMaskUVAnimated: 0 + - _PanoToggle: 0 + - _PanoToggleAnimated: 0 + - _PanosphereColorAnimated: 0 + - _PanospherePanAnimated: 0 + - _PanosphereTextureAnimated: 0 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxBiasAnimated: 0 + - _ParallaxHeightMapAnimated: 0 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapEnabledAnimated: 0 + - _ParallaxHeightMapMaskAnimated: 0 + - _ParallaxHeightMapMaskPanAnimated: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxHeightMapMaskUVAnimated: 0 + - _ParallaxHeightMapPanAnimated: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightFromAlphaAnimated: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalHeightmapModeAnimated: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalIterationsAnimated: 0 + - _ParallaxInternalMapAnimated: 0 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapEnabledAnimated: 0 + - _ParallaxInternalMapMaskAnimated: 0 + - _ParallaxInternalMapMaskPanAnimated: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMapMaskUVAnimated: 0 + - _ParallaxInternalMaxColorAnimated: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxDepthAnimated: 0 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMaxFadeAnimated: 0 + - _ParallaxInternalMinColorAnimated: 0 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinDepthAnimated: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxInternalMinFadeAnimated: 0 + - _ParallaxInternalPanDepthSpeedAnimated: 0 + - _ParallaxInternalPanSpeedAnimated: 0 + - _ParallaxMap: 0 + - _ParallaxMapAnimated: 0 + - _ParallaxStrength: 0 + - _ParallaxStrengthAnimated: 0 + - _ParallaxUV: 0 + - _ParallaxUVAnimated: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PoiMode: 1 + - _PoiModeAnimated: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlendMultiplicativeAnimated: 0 + - _RGBBluePanningAnimated: 0 + - _RGBBlue_UV: 0 + - _RGBBlue_UVAnimated: 0 + - _RGBGreenPanningAnimated: 0 + - _RGBGreen_UV: 0 + - _RGBGreen_UVAnimated: 0 + - _RGBMaskAnimated: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskEnabledAnimated: 0 + - _RGBMaskPanningAnimated: 0 + - _RGBMaskUV: 0 + - _RGBMaskUVAnimated: 0 + - _RGBNormalBlend: 0 + - _RGBNormalBlendAnimated: 0 + - _RGBRedPanningAnimated: 0 + - _RGBRed_UV: 0 + - _RGBRed_UVAnimated: 0 + - _RGBUseVertexColors: 0 + - _RGBUseVertexColorsAnimated: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorAnimated: 0 + - _RedTexureAnimated: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionChromaticAberattionAnimated: 0 + - _RefractionEnabled: 1 + - _RefractionEnabledAnimated: 0 + - _RefractionIndex: 1.333333 + - _RefractionIndexAnimated: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0.15 + - _RimBrightenAnimated: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroBlurAnimated: 0 + - _RimEnviroIntensity: 1 + - _RimEnviroIntensityAnimated: 0 + - _RimEnviroMaskAnimated: 0 + - _RimEnviroMaskPanAnimated: 0 + - _RimEnviroMaskUV: 0 + - _RimEnviroMaskUVAnimated: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroMinBrightnessAnimated: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroSharpnessAnimated: 0 + - _RimEnviroWidth: 0.45 + - _RimEnviroWidthAnimated: 0 + - _RimHueShift: 0 + - _RimHueShiftAnimated: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftEnabledAnimated: 0 + - _RimHueShiftSpeed: 0 + - _RimHueShiftSpeedAnimated: 0 + - _RimLightColorAnimated: 0 + - _RimLightColorBias: 0 + - _RimLightColorBiasAnimated: 0 + - _RimLightNormal: 1 + - _RimLightNormalAnimated: 0 + - _RimLightingInvert: 0 + - _RimLightingInvertAnimated: 0 + - _RimMaskAnimated: 0 + - _RimMaskPanAnimated: 0 + - _RimMaskUV: 0 + - _RimMaskUVAnimated: 0 + - _RimSharpness: 0.25 + - _RimSharpnessAnimated: 0 + - _RimStrength: 0 + - _RimStrengthAnimated: 0 + - _RimTexAnimated: 0 + - _RimTexPanAnimated: 0 + - _RimTexUV: 0 + - _RimTexUVAnimated: 0 + - _RimWidth: 0.8 + - _RimWidthAnimated: 0 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseStrengthAnimated: 0 + - _RimWidthNoiseTextureAnimated: 0 + - _RimWidthNoiseTexturePanAnimated: 0 + - _RimWidthNoiseTextureUV: 0 + - _RimWidthNoiseTextureUVAnimated: 0 + - _SSSColorAnimated: 0 + - _SSSDistortion: 1 + - _SSSDistortionAnimated: 0 + - _SSSPower: 5 + - _SSSPowerAnimated: 0 + - _SSSSCale: 0.25 + - _SSSSCaleAnimated: 0 + - _SSSThicknessMapAnimated: 0 + - _SSSThicknessMapPanAnimated: 0 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMapUVAnimated: 0 + - _SSSThicknessMod: 0 + - _SSSThicknessModAnimated: 0 + - _SampleWorld: 0 + - _SampleWorldAnimated: 0 + - _Saturation: 0 + - _SaturationAnimated: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission1Animated: 0 + - _ScrollingEmissionAnimated: 0 + - _ShadeColor_Step: 0 + - _ShadeColor_StepAnimated: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixAnimated: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixThresholdAnimated: 0 + - _ShadowMixWidthMod: 0.5 + - _ShadowMixWidthModAnimated: 0 + - _ShadowOffset: 0 + - _ShadowOffset1: 0 + - _ShadowOffset1Animated: 0 + - _ShadowOffset2: 0 + - _ShadowOffset2Animated: 0 + - _ShadowOffsetAnimated: 0 + - _ShadowStrength: 1 + - _ShadowStrengthAnimated: 0 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 1 + - _SmoothnessAnimated: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessFrom1Animated: 0 + - _SmoothnessFromAnimated: 0 + - _SmoothnessMaskAnimated: 0 + - _SmoothnessMaskPanAnimated: 0 + - _SmoothnessMaskUV: 0 + - _SmoothnessMaskUVAnimated: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInAlphaAnimated: 0 + - _SpawnInEmissionColorAnimated: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInEmissionOffsetAnimated: 0 + - _SpawnInGradientFinishAnimated: 0 + - _SpawnInGradientStartAnimated: 0 + - _SpawnInNoiseAnimated: 0 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInNoiseIntensityAnimated: 0 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetAnimated: 0 + - _SpawnInVertOffsetOffset: 0.1 + - _SpawnInVertOffsetOffsetAnimated: 0 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec1Offset1Animated: 0 + - _Spec1OffsetAnimated: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _Spec2Smoothness1Animated: 0 + - _Spec2SmoothnessAnimated: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecWhatTangent1Animated: 0 + - _SpecWhatTangentAnimated: 0 + - _SpecularAnisoJitterMacro1Animated: 0 + - _SpecularAnisoJitterMacro1PanAnimated: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacro1UVAnimated: 0 + - _SpecularAnisoJitterMacroAnimated: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroMultiplier1Animated: 0 + - _SpecularAnisoJitterMacroMultiplierAnimated: 0 + - _SpecularAnisoJitterMacroPanAnimated: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMacroUVAnimated: 0 + - _SpecularAnisoJitterMicro1Animated: 0 + - _SpecularAnisoJitterMicro1PanAnimated: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicro1UVAnimated: 0 + - _SpecularAnisoJitterMicroAnimated: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroMultiplier1Animated: 0 + - _SpecularAnisoJitterMicroMultiplierAnimated: 0 + - _SpecularAnisoJitterMicroPanAnimated: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMicroUVAnimated: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularAnisoJitterMirrored1Animated: 0 + - _SpecularAnisoJitterMirroredAnimated: 0 + - _SpecularAttenuation: 1 + - _SpecularAttenuation1: 1 + - _SpecularAttenuation1Animated: 0 + - _SpecularAttenuationAnimated: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularInvertSmoothness1Animated: 0 + - _SpecularInvertSmoothnessAnimated: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1Animated: 0 + - _SpecularMap1PanAnimated: 0 + - _SpecularMap1UV: 0 + - _SpecularMap1UVAnimated: 0 + - _SpecularMapAnimated: 0 + - _SpecularMapPanAnimated: 0 + - _SpecularMapUV: 0 + - _SpecularMapUVAnimated: 0 + - _SpecularMask1Animated: 0 + - _SpecularMask1PanAnimated: 0 + - _SpecularMask1UV: 0 + - _SpecularMask1UVAnimated: 0 + - _SpecularMaskAnimated: 0 + - _SpecularMaskPanAnimated: 0 + - _SpecularMaskUV: 0 + - _SpecularMaskUVAnimated: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallic1Animated: 0 + - _SpecularMetallicAnimated: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularNormal1Animated: 0 + - _SpecularNormalAnimated: 0 + - _SpecularSmoothness: 0.908 + - _SpecularSmoothness1: 0.75 + - _SpecularSmoothness1Animated: 0 + - _SpecularSmoothnessAnimated: 0 + - _SpecularTint1Animated: 0 + - _SpecularTintAnimated: 0 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonEnd1Animated: 0 + - _SpecularToonEndAnimated: 0 + - _SpecularToonInnerOuter1Animated: 0 + - _SpecularToonInnerOuterAnimated: 0 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularToonStart1Animated: 0 + - _SpecularToonStartAnimated: 0 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SpecularType1Animated: 0 + - _SpecularTypeAnimated: 0 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SrcBlendAnimated: 0 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilCompareFunctionAnimated: 0 + - _StencilFailOp: 0 + - _StencilFailOpAnimated: 0 + - _StencilPassOp: 0 + - _StencilPassOpAnimated: 0 + - _StencilReadMask: 255 + - _StencilReadMaskAnimated: 0 + - _StencilRef: 0 + - _StencilRefAnimated: 0 + - _StencilWriteMask: 255 + - _StencilWriteMaskAnimated: 0 + - _StencilZFailOp: 0 + - _StencilZFailOpAnimated: 0 + - _TextEnabled: 0 + - _TextEnabledAnimated: 0 + - _TextFPSColorAnimated: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEmissionStrengthAnimated: 0 + - _TextFPSEnabled: 0 + - _TextFPSEnabledAnimated: 0 + - _TextFPSOffsetAnimated: 0 + - _TextFPSPaddingAnimated: 0 + - _TextFPSRotation: 0 + - _TextFPSRotationAnimated: 0 + - _TextFPSScaleAnimated: 0 + - _TextFPSUV: 0 + - _TextFPSUVAnimated: 0 + - _TextGlyphsAnimated: 0 + - _TextPixelRange: 4 + - _TextPixelRangeAnimated: 0 + - _TextPositionColorAnimated: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEmissionStrengthAnimated: 0 + - _TextPositionEnabled: 0 + - _TextPositionEnabledAnimated: 0 + - _TextPositionOffsetAnimated: 0 + - _TextPositionPaddingAnimated: 0 + - _TextPositionRotation: 0 + - _TextPositionRotationAnimated: 0 + - _TextPositionScaleAnimated: 0 + - _TextPositionUV: 0 + - _TextPositionUVAnimated: 0 + - _TextTimeColorAnimated: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEmissionStrengthAnimated: 0 + - _TextTimeEnabled: 0 + - _TextTimeEnabledAnimated: 0 + - _TextTimeOffsetAnimated: 0 + - _TextTimePaddingAnimated: 0 + - _TextTimeRotation: 0 + - _TextTimeRotationAnimated: 0 + - _TextTimeScaleAnimated: 0 + - _TextTimeUV: 0 + - _TextTimeUVAnimated: 0 + - _ToonRamp1Animated: 0 + - _ToonRamp2Animated: 0 + - _ToonRampAnimated: 0 + - _UVSec: 0 + - _UseShadowTexture: 0 + - _UseShadowTextureAnimated: 0 + - _Use_1stAs2nd: 0 + - _Use_1stAs2ndAnimated: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_1stShadeMapAlpha_As_ShadowMaskAnimated: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMaskAnimated: 0 + - _Use_BaseAs1st: 0 + - _Use_BaseAs1stAnimated: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchFrequencyAnimated: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchStrengthAnimated: 0 + - _VertexGlitchThreshold: 1 + - _VertexGlitchThresholdAnimated: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightAnimated: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightBiasAnimated: 0 + - _VertexManipulationHeightMaskAnimated: 0 + - _VertexManipulationHeightPanAnimated: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationHeightUVAnimated: 0 + - _VertexManipulationLocalRotationAnimated: 0 + - _VertexManipulationLocalScaleAnimated: 0 + - _VertexManipulationLocalTranslationAnimated: 0 + - _VertexManipulationWorldTranslationAnimated: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingDivisionAnimated: 0 + - _VertexRoundingEnabled: 0 + - _VertexRoundingEnabledAnimated: 0 + - _VertexUnwrap: 0 + - _VertexUnwrapAnimated: 0 + - _VideoBacklight: 1 + - _VideoBacklightAnimated: 0 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTPixelEnergizedTimeAnimated: 0 + - _VideoCRTRefreshRate: 24 + - _VideoCRTRefreshRateAnimated: 0 + - _VideoContrast: 0 + - _VideoContrastAnimated: 0 + - _VideoDebugTextureAnimated: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableDebugAnimated: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoEnableVideoPlayerAnimated: 0 + - _VideoGameboyRampAnimated: 0 + - _VideoMaskPanningAnimated: 0 + - _VideoMaskTextureAnimated: 0 + - _VideoOffsetAnimated: 0 + - _VideoPanningAnimated: 0 + - _VideoPixelTextureAnimated: 0 + - _VideoPixelateToResolution: 0 + - _VideoPixelateToResolutionAnimated: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoRepeatVideoTextureAnimated: 0 + - _VideoResolutionAnimated: 0 + - _VideoSaturation: 0 + - _VideoSaturationAnimated: 0 + - _VideoTilingAnimated: 0 + - _VideoType: 3 + - _VideoTypeAnimated: 0 + - _VideoUVNumber: 0 + - _VideoUVNumberAnimated: 0 + - _VoronoiBlend: 0 + - _VoronoiBlendAnimated: 0 + - _VoronoiColor0Animated: 0 + - _VoronoiColor1Animated: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEffectsMaterialAlphaAnimated: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission0Animated: 0 + - _VoronoiEmission1: 0 + - _VoronoiEmission1Animated: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiEnableRandomCellColorAnimated: 0 + - _VoronoiGradientAnimated: 0 + - _VoronoiMaskAnimated: 0 + - _VoronoiMaskPanAnimated: 0 + - _VoronoiMaskUV: 0 + - _VoronoiMaskUVAnimated: 0 + - _VoronoiNoiseAnimated: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseIntensityAnimated: 0 + - _VoronoiNoisePanAnimated: 0 + - _VoronoiNoiseUV: 0 + - _VoronoiNoiseUVAnimated: 0 + - _VoronoiRandomMinMaxBrightnessAnimated: 0 + - _VoronoiRandomMinMaxSaturationAnimated: 0 + - _VoronoiScale: 5 + - _VoronoiScaleAnimated: 0 + - _VoronoiSpace: 0 + - _VoronoiSpaceAnimated: 0 + - _VoronoiSpeedAnimated: 0 + - _VoronoiType: 1 + - _VoronoiTypeAnimated: 0 + - _Wriggle: 0.28 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZTestAnimated: 0 + - _ZWrite: 1 + - _ZWriteAnimated: 0 + - __dirty: 1 + - _commentIfZero_EnableGrabpass: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _commentIfZero_LightingAdditiveEnableAnimated: 0 + - _glitterFrequencyLinearEmissive: 20 + - _glitterFrequencyLinearEmissiveAnimated: 0 + - _squeeze: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingBeta: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_shadowTexture: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 1 + - m_mainOptions: 0 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 1 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 1 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 1 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 1 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 1 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 1 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 1 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingBeta: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_shadowTexture: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: -10, a: 10} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: -10, a: 10} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: -1, a: 1} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: -1, a: 1} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 5, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.6839622, g: 0.98736686, b: 1, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 2, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingEndColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainDistanceFade: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainHueShiftMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat.meta new file mode 100644 index 00000000..03bd98dd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/M_Slime.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13dd248373e5f8f4f8c0b1143481373d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil.meta new file mode 100644 index 00000000..cbdf081f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0474baa79a2c0bc498935959455df1d8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx new file mode 100644 index 00000000..4ced4f01 Binary files /dev/null and b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx differ diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx.meta new file mode 100644 index 00000000..eb70f8e4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/DoubleSphere.fbx.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 8159a8c4615e8c745be28e820af37cf4 +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: inside + 2100002: outside + 2300000: //RootNode + 3300000: //RootNode + 4300000: Sphere + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: inside + second: {fileID: 2100000, guid: 30f4ef6c54f791c4a81aad0db95bdd5e, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: outside + second: {fileID: 2100000, guid: dd5a9a3b9e3639c46bda1485d4465e63, type: 2} + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + previousCalculatedGlobalScale: 1 + hasPreviousCalculatedGlobalScale: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + serializedVersion: 2 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat new file mode 100644 index 00000000..2b6b1541 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat @@ -0,0 +1,2093 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: inside + m_Shader: {fileID: 4800000, guid: 917b37092bae034459c28c00a3a19b54, type: 3} + m_ShaderKeywords: VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3001 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainHueShiftMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 5757e282ae2aac54e99d40378b103e7c, type: 3} + m_Scale: {x: 10, y: 5} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1st_ShadeMapUV: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AOStrengthAnimated: 0 + - _AlphaMaskAnimated: 0 + - _AlphaMaskPanAnimated: 0 + - _AlphaMaskUV: 0 + - _AlphaMaskUVAnimated: 0 + - _AlphaMod: 0 + - _AlphaModAnimated: 0 + - _AlphaPremultiply: 0 + - _AlphaPremultiplyAnimated: 0 + - _AlphaToMask: 0 + - _AlphaToMaskAnimated: 0 + - _AngleCompareTo: 0 + - _AngleCompareToAnimated: 0 + - _AngleForwardDirectionAnimated: 0 + - _AngleMinAlpha: 0 + - _AngleMinAlphaAnimated: 0 + - _AngleType: 0 + - _AngleTypeAnimated: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec1Alpha1Animated: 0 + - _AnisoSpec1AlphaAnimated: 0 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoSpec2Alpha1Animated: 0 + - _AnisoSpec2AlphaAnimated: 0 + - _AnisoTangentMap1Animated: 0 + - _AnisoTangentMap1PanAnimated: 0 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMap1UVAnimated: 0 + - _AnisoTangentMapAnimated: 0 + - _AnisoTangentMapPanAnimated: 0 + - _AnisoTangentMapUV: 0 + - _AnisoTangentMapUVAnimated: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AnisoUseTangentMap1Animated: 0 + - _AnisoUseTangentMapAnimated: 0 + - _AttenuationMultiplier: 0 + - _AttenuationMultiplierAnimated: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskClearCoatAnimated: 0 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDebugAnimated: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskDissolveAnimated: 0 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEmission2Animated: 0 + - _BlackLightMaskEmissionAnimated: 0 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskEnabledAnimated: 0 + - _BlackLightMaskEndAnimated: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskFlipbookAnimated: 0 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskGlitterAnimated: 0 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskIridescenceAnimated: 0 + - _BlackLightMaskKeysAnimated: 0 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMatcap2Animated: 0 + - _BlackLightMaskMatcapAnimated: 0 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskMetallicAnimated: 0 + - _BlackLightMaskPanosphere: 4 + - _BlackLightMaskPanosphereAnimated: 0 + - _BlackLightMaskStartAnimated: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendOpAlphaAnimated: 0 + - _BlendOpAnimated: 0 + - _BlueColorAnimated: 0 + - _BlueTextureAnimated: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeFadeLengthAnimated: 0 + - _BuldgeHeight: 0.02 + - _BuldgeHeightAnimated: 0 + - _BulgeMaskAnimated: 0 + - _BumpMapAnimated: 0 + - _BumpMapPanAnimated: 0 + - _BumpMapUV: 0 + - _BumpMapUVAnimated: 0 + - _BumpScale: 1 + - _BumpScaleAnimated: 0 + - _CameraAngleMax: 90 + - _CameraAngleMaxAnimated: 0 + - _CameraAngleMin: 45 + - _CameraAngleMinAnimated: 0 + - _ClearCoat: 1 + - _ClearCoatAnimated: 0 + - _ClearCoatCubeMapAnimated: 0 + - _ClearCoatForceLighting: 0 + - _ClearCoatForceLightingAnimated: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatInvertSmoothnessAnimated: 0 + - _ClearCoatMaskAnimated: 0 + - _ClearCoatMaskPanAnimated: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatMaskUVAnimated: 0 + - _ClearCoatNormalToUse: 0 + - _ClearCoatNormalToUseAnimated: 0 + - _ClearCoatSampleWorld: 0 + - _ClearCoatSampleWorldAnimated: 0 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessAnimated: 0 + - _ClearCoatSmoothnessMapAnimated: 0 + - _ClearCoatSmoothnessMapPanAnimated: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatSmoothnessMapUVAnimated: 0 + - _ClearCoatTintAnimated: 0 + - _ColorAnimated: 0 + - _ColorMask: 15 + - _ColorMaskAnimated: 0 + - _ContinuousDissolve: 0 + - _ContinuousDissolveAnimated: 0 + - _CubeMapAnimated: 0 + - _Cull: 2 + - _CullAnimated: 0 + - _Cutoff: 0 + - _CutoffAnimated: 0 + - _DebugCameraData: 0 + - _DebugCameraDataAnimated: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugLightingDataAnimated: 0 + - _DebugMeshData: 0 + - _DebugMeshDataAnimated: 0 + - _DecalBlendAdd: 0 + - _DecalBlendAddAnimated: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlphaAnimated: 0 + - _DecalBlendMultiply: 0 + - _DecalBlendMultiplyAnimated: 0 + - _DecalBlendReplace: 0 + - _DecalBlendReplaceAnimated: 0 + - _DecalBlendType: 0 + - _DecalBlendTypeAnimated: 0 + - _DecalColorAnimated: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrengthAnimated: 0 + - _DecalEnabled: 0 + - _DecalEnabledAnimated: 0 + - _DecalMaskAnimated: 0 + - _DecalMaskPanAnimated: 0 + - _DecalMaskUV: 0 + - _DecalMaskUVAnimated: 0 + - _DecalPositionAnimated: 0 + - _DecalRotation: 0 + - _DecalRotationAnimated: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeedAnimated: 0 + - _DecalScaleAnimated: 0 + - _DecalTextureAnimated: 0 + - _DecalTexturePanAnimated: 0 + - _DecalTextureUV: 0 + - _DecalTextureUVAnimated: 0 + - _DecalTiled: 0 + - _DecalTiledAnimated: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxAnimated: 0 + - _DepthAlphaMin: 1 + - _DepthAlphaMinAnimated: 0 + - _DepthGlowColorAnimated: 0 + - _DepthGlowEmission: 3 + - _DepthGlowEmissionAnimated: 0 + - _DepthGradientAnimated: 0 + - _DepthGradientBlend: 0 + - _DepthGradientBlendAnimated: 0 + - _DepthGradientPanAnimated: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientTextureUVAnimated: 0 + - _DepthGradientUV: 0 + - _DepthGradientUVAnimated: 0 + - _DepthMaskAnimated: 0 + - _DepthMaskPanAnimated: 0 + - _DepthMaskUV: 0 + - _DepthMaskUVAnimated: 0 + - _DetailBrightness: 1 + - _DetailBrightnessAnimated: 0 + - _DetailEnabled: 0 + - _DetailMaskAnimated: 0 + - _DetailMaskPanAnimated: 0 + - _DetailMaskUV: 0 + - _DetailMaskUVAnimated: 0 + - _DetailNormalMapAnimated: 0 + - _DetailNormalMapPanAnimated: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapScaleAnimated: 0 + - _DetailNormalMapUV: 0 + - _DetailNormalMapUVAnimated: 0 + - _DetailTexAnimated: 0 + - _DetailTexIntensity: 1 + - _DetailTexIntensityAnimated: 0 + - _DetailTexPanAnimated: 0 + - _DetailTexUV: 0 + - _DetailTexUVAnimated: 0 + - _DetailTintAnimated: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha0Animated: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha1Animated: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha2Animated: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha3Animated: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha4Animated: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha5Animated: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha6Animated: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha7Animated: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha8Animated: 0 + - _DissolveAlpha9: 0 + - _DissolveAlpha9Animated: 0 + - _DissolveAlphaAnimated: 0 + - _DissolveDetailNoiseAnimated: 0 + - _DissolveDetailNoisePanAnimated: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailNoiseUVAnimated: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveDetailStrengthAnimated: 0 + - _DissolveEdgeColorAnimated: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeEmissionAnimated: 0 + - _DissolveEdgeGradientAnimated: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHardnessAnimated: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEdgeWidthAnimated: 0 + - _DissolveEmission1Side: 2 + - _DissolveEmission1SideAnimated: 0 + - _DissolveEmissionSide: 2 + - _DissolveEmissionSideAnimated: 0 + - _DissolveEndPointAnimated: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertDetailNoiseAnimated: 0 + - _DissolveInvertNoise: 0 + - _DissolveInvertNoiseAnimated: 0 + - _DissolveMaskAnimated: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskInvertAnimated: 0 + - _DissolveMaskPanAnimated: 0 + - _DissolveMaskUV: 0 + - _DissolveMaskUVAnimated: 0 + - _DissolveNoiseTextureAnimated: 0 + - _DissolveNoiseTexturePanAnimated: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveNoiseTextureUVAnimated: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PEdgeLengthAnimated: 0 + - _DissolveP2PWorldLocal: 0 + - _DissolveP2PWorldLocalAnimated: 0 + - _DissolveStartPointAnimated: 0 + - _DissolveTextureColorAnimated: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToEmissionStrengthAnimated: 0 + - _DissolveToTextureAnimated: 0 + - _DissolveToTexturePanAnimated: 0 + - _DissolveToTextureUV: 0 + - _DissolveToTextureUVAnimated: 0 + - _DissolveType: 1 + - _DissolveTypeAnimated: 0 + - _DissolveUseVertexColors: 0 + - _DissolveUseVertexColorsAnimated: 0 + - _DistortionFlowTexture1Animated: 0 + - _DistortionFlowTextureAnimated: 0 + - _DistortionMaskAnimated: 0 + - _DistortionMaskPanAnimated: 0 + - _DistortionMaskUV: 0 + - _DistortionMaskUVAnimated: 0 + - _DistortionSpeed1Animated: 0 + - _DistortionSpeedAnimated: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1Animated: 0 + - _DistortionStrengthAnimated: 0 + - _DitherGradient: 0.1 + - _DitherGradientAnimated: 0 + - _DitheringEnabled: 0 + - _DitheringEnabledAnimated: 0 + - _DstBlend: 10 + - _DstBlendAnimated: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap1Animated: 0 + - _EmissionBaseColorAsMapAnimated: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabledAnimated: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset1Animated: 0 + - _EmissionBlinkingOffsetAnimated: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled1Animated: 0 + - _EmissionCenterOutEnabledAnimated: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed1Animated: 0 + - _EmissionCenterOutSpeedAnimated: 0 + - _EmissionColor1Animated: 0 + - _EmissionColorAnimated: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift1Animated: 0 + - _EmissionHueShiftAnimated: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled1Animated: 0 + - _EmissionHueShiftEnabledAnimated: 0 + - _EmissionMap1Animated: 0 + - _EmissionMap1PanAnimated: 0 + - _EmissionMap1UV: 0 + - _EmissionMap1UVAnimated: 0 + - _EmissionMapAnimated: 0 + - _EmissionMapPanAnimated: 0 + - _EmissionMapUV: 0 + - _EmissionMapUVAnimated: 0 + - _EmissionMask1Animated: 0 + - _EmissionMask1PanAnimated: 0 + - _EmissionMask1UV: 0 + - _EmissionMask1UVAnimated: 0 + - _EmissionMaskAnimated: 0 + - _EmissionMaskPanAnimated: 0 + - _EmissionMaskUV: 0 + - _EmissionMaskUVAnimated: 0 + - _EmissionReplace: 0 + - _EmissionReplaceAnimated: 0 + - _EmissionScrollingCurve1Animated: 0 + - _EmissionScrollingCurveAnimated: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingOffset1Animated: 0 + - _EmissionScrollingOffsetAnimated: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve1Animated: 0 + - _EmissionScrollingUseCurveAnimated: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor1Animated: 0 + - _EmissionScrollingVertexColorAnimated: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength1Animated: 0 + - _EmissionStrengthAnimated: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max1Animated: 0 + - _EmissiveBlink_MaxAnimated: 0 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min1Animated: 0 + - _EmissiveBlink_MinAnimated: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity1Animated: 0 + - _EmissiveBlink_VelocityAnimated: 0 + - _EmissiveScroll_Direction1Animated: 0 + - _EmissiveScroll_DirectionAnimated: 0 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval1Animated: 0 + - _EmissiveScroll_IntervalAnimated: 0 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity1Animated: 0 + - _EmissiveScroll_VelocityAnimated: 0 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width1Animated: 0 + - _EmissiveScroll_WidthAnimated: 0 + - _EnableBlur: 0 + - _EnableBlurAnimated: 0 + - _EnableBulge: 0 + - _EnableBulgeAnimated: 0 + - _EnableClearCoat: 0 + - _EnableClearCoatAnimated: 0 + - _EnableDissolve: 0 + - _EnableDissolveAnimated: 0 + - _EnableDistortion: 0 + - _EnableDistortionAnimated: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1Animated: 0 + - _EnableEmissionAnimated: 0 + - _EnableEnvironmentalRim: 0 + - _EnableEnvironmentalRimAnimated: 0 + - _EnableFlipbook: 0 + - _EnableFlipbookAnimated: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission1Animated: 0 + - _EnableGITDEmissionAnimated: 0 + - _EnableHolo: 0 + - _EnableHoloAnimated: 0 + - _EnableIridescence: 0 + - _EnableIridescenceAnimated: 0 + - _EnableLighting: 1 + - _EnableLightingAnimated: 0 + - _EnableMetallic: 0 + - _EnableMetallicAnimated: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorOptionsAnimated: 0 + - _EnableMirrorTexture: 0 + - _EnableMirrorTextureAnimated: 0 + - _EnableRandom: 0 + - _EnableRandomAnimated: 0 + - _EnableRimLighting: 0 + - _EnableRimLightingAnimated: 0 + - _EnableSSS: 0 + - _EnableSSSAnimated: 0 + - _EnableScifiSpawnIn: 0 + - _EnableScifiSpawnInAnimated: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableSpecular1Animated: 0 + - _EnableSpecularAnimated: 0 + - _EnableTouchGlow: 0 + - _EnableTouchGlowAnimated: 0 + - _EnableVertexGlitch: 0 + - _EnableVertexGlitchAnimated: 0 + - _EnableVideo: 0 + - _EnableVideoAnimated: 0 + - _EnableVoronoi: 0 + - _EnableVoronoiAnimated: 0 + - _FadeLength: 20 + - _FadeLengthAnimated: 0 + - _FlipbookAdd: 0 + - _FlipbookAddAnimated: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookAlphaControlsFinalAlphaAnimated: 0 + - _FlipbookColorAnimated: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookColorReplacesAnimated: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookCurrentFrameAnimated: 0 + - _FlipbookEmissionStrength: 0 + - _FlipbookEmissionStrengthAnimated: 0 + - _FlipbookFPS: 30 + - _FlipbookFPSAnimated: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookIntensityControlsAlphaAnimated: 0 + - _FlipbookMaskAnimated: 0 + - _FlipbookMaskPanAnimated: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMaskUVAnimated: 0 + - _FlipbookMultiply: 0 + - _FlipbookMultiplyAnimated: 0 + - _FlipbookReplace: 1 + - _FlipbookReplaceAnimated: 0 + - _FlipbookRotation: 0 + - _FlipbookRotationAnimated: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookRotationSpeedAnimated: 0 + - _FlipbookScaleOffsetAnimated: 0 + - _FlipbookTexArrayAnimated: 0 + - _FlipbookTexArrayPanAnimated: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTexArrayUVAnimated: 0 + - _FlipbookTiled: 0 + - _FlipbookTiledAnimated: 0 + - _FlipbookTotalFrames: 1 + - _FlipbookTotalFramesAnimated: 0 + - _ForceOpaque: 0 + - _ForceOpaqueAnimated: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier1Animated: 0 + - _GITDEMaxEmissionMultiplierAnimated: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight1Animated: 0 + - _GITDEMaxLightAnimated: 0 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier1Animated: 0 + - _GITDEMinEmissionMultiplierAnimated: 0 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight1Animated: 0 + - _GITDEMinLightAnimated: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh1Animated: 0 + - _GITDEWorldOrMeshAnimated: 0 + - _GlitterAngleRange: 90 + - _GlitterAngleRangeAnimated: 0 + - _GlitterBias: 0.8 + - _GlitterBiasAnimated: 0 + - _GlitterBlendType: 0 + - _GlitterBlendTypeAnimated: 0 + - _GlitterBrightness: 3 + - _GlitterBrightnessAnimated: 0 + - _GlitterCenterSize: 0.08 + - _GlitterCenterSizeAnimated: 0 + - _GlitterColorAnimated: 0 + - _GlitterColorMapAnimated: 0 + - _GlitterColorMapPanAnimated: 0 + - _GlitterColorMapUV: 0 + - _GlitterColorMapUVAnimated: 0 + - _GlitterContrast: 300 + - _GlitterContrastAnimated: 0 + - _GlitterEnable: 0 + - _GlitterEnableAnimated: 0 + - _GlitterFrequency: 300 + - _GlitterFrequencyAnimated: 0 + - _GlitterJaggyFix: 0 + - _GlitterJaggyFixAnimated: 0 + - _GlitterJitter: 1 + - _GlitterJitterAnimated: 0 + - _GlitterMaskAnimated: 0 + - _GlitterMaskPanAnimated: 0 + - _GlitterMaskUV: 0 + - _GlitterMaskUVAnimated: 0 + - _GlitterMinBrightness: 0 + - _GlitterMinBrightnessAnimated: 0 + - _GlitterMinMaxBrightnessAnimated: 0 + - _GlitterMinMaxSaturationAnimated: 0 + - _GlitterMinMaxSizeAnimated: 0 + - _GlitterMode: 0 + - _GlitterModeAnimated: 0 + - _GlitterPanAnimated: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomColorsAnimated: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomRotationAnimated: 0 + - _GlitterRandomSize: 0 + - _GlitterRandomSizeAnimated: 0 + - _GlitterShape: 0 + - _GlitterShapeAnimated: 0 + - _GlitterSize: 0.3 + - _GlitterSizeAnimated: 0 + - _GlitterSpeed: 10 + - _GlitterSpeedAnimated: 0 + - _GlitterTextureAnimated: 0 + - _GlitterTexturePanAnimated: 0 + - _GlitterTextureRotation: 0 + - _GlitterTextureRotationAnimated: 0 + - _GlitterUseSurfaceColor: 0 + - _GlitterUseSurfaceColorAnimated: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _GrabBlurDirections: 4 + - _GrabBlurDirectionsAnimated: 0 + - _GrabBlurDistance: 0 + - _GrabBlurDistanceAnimated: 0 + - _GrabBlurQuality: 2 + - _GrabBlurQualityAnimated: 0 + - _GrabDstBlend: 0 + - _GrabDstBlendAnimated: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendFactorAnimated: 0 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabPassUseAlphaAnimated: 0 + - _GrabSrcBlend: 2 + - _GrabSrcBlendAnimated: 0 + - _GreenColorAnimated: 0 + - _GreenTextureAnimated: 0 + - _HelpBoxHideLocking: 0 + - _HelpBoxLocking: 0 + - _HoloAlphaMapAnimated: 0 + - _HoloCoordinateSpace: 0 + - _HoloCoordinateSpaceAnimated: 0 + - _HoloDirectionAnimated: 0 + - _HoloFresnelAlpha: 0 + - _HoloFresnelAlphaAnimated: 0 + - _HoloLineDensity: 10 + - _HoloLineDensityAnimated: 0 + - _HoloRimSharpness: 0.5 + - _HoloRimSharpnessAnimated: 0 + - _HoloRimWidth: 0.5 + - _HoloRimWidthAnimated: 0 + - _HoloScrollSpeed: 1 + - _HoloScrollSpeedAnimated: 0 + - _IgnoreFog: 0 + - _IgnoreFogAnimated: 0 + - _InvertSmoothness: 0 + - _InvertSmoothnessAnimated: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAddBlendAnimated: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceEmissionStrengthAnimated: 0 + - _IridescenceIntensity: 1 + - _IridescenceIntensityAnimated: 0 + - _IridescenceMaskAnimated: 0 + - _IridescenceMaskUV: 0 + - _IridescenceMaskUVAnimated: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceMultiplyBlendAnimated: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalIntensityAnimated: 0 + - _IridescenceNormalMapAnimated: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalSelectionAnimated: 0 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalToggleAnimated: 0 + - _IridescenceNormalUV: 0 + - _IridescenceNormalUVAnimated: 0 + - _IridescenceRampAnimated: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceReplaceBlendAnimated: 0 + - _IridescenceTime: 0 + - _IridescenceTimeAnimated: 0 + - _LightingAOTexAnimated: 0 + - _LightingAOTexPanAnimated: 0 + - _LightingAOTexUV: 0 + - _LightingAOTexUVAnimated: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveDetailStrengthAnimated: 0 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientEndAnimated: 0 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveGradientStartAnimated: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimitIntensityAnimated: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMaxIntensityAnimated: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditivePassthroughAnimated: 0 + - _LightingAdditiveType: 1 + - _LightingAdditiveTypeAnimated: 0 + - _LightingDetailShadowsAnimated: 0 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsEnabledAnimated: 0 + - _LightingDetailShadowsPanAnimated: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailShadowsUVAnimated: 0 + - _LightingDetailStrength: 1 + - _LightingDetailStrengthAnimated: 0 + - _LightingDirectColorMode: 0 + - _LightingDirectColorModeAnimated: 0 + - _LightingEnableAO: 0 + - _LightingEnableAOAnimated: 0 + - _LightingEnableHSL: 0 + - _LightingEnableHSLAnimated: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndAnimated: 0 + - _LightingGradientStart: 0 + - _LightingGradientStartAnimated: 0 + - _LightingHSLIntensity: 1 + - _LightingHSLIntensityAnimated: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIgnoreAmbientColorAnimated: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectColorModeAnimated: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightBrightnessAnimated: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMinShadowBrightnessRatioAnimated: 0 + - _LightingMode: 0 + - _LightingModeAnimated: 0 + - _LightingMonochromatic: 0 + - _LightingMonochromaticAnimated: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingOnlyUnityShadowsAnimated: 0 + - _LightingRampType: 0 + - _LightingRampTypeAnimated: 0 + - _LightingShadingEnabled: 0 + - _LightingShadingEnabledAnimated: 0 + - _LightingShadowColorAnimated: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowHueAnimated: 0 + - _LightingShadowLightness: 0.5 + - _LightingShadowLightnessAnimated: 0 + - _LightingShadowMaskAnimated: 0 + - _LightingShadowMaskPanAnimated: 0 + - _LightingShadowMaskUV: 0 + - _LightingShadowMaskUVAnimated: 0 + - _LightingShadowSaturation: 0.5 + - _LightingShadowSaturationAnimated: 0 + - _LightingShadowTextureAnimated: 0 + - _LightingShadowTexturePanAnimated: 0 + - _LightingShadowTextureUV: 0 + - _LightingShadowTextureUVAnimated: 0 + - _LightingStandardSmoothness: 0 + - _LightingStandardSmoothnessAnimated: 0 + - _LightingUncapped: 0 + - _LightingUncappedAnimated: 0 + - _LineColorAnimated: 0 + - _LineWidth: 0 + - _LineWidthAnimated: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainAlphaToCoverageAnimated: 0 + - _MainDistanceFadeAnimated: 0 + - _MainEmissionStrength: 0 + - _MainEmissionStrengthAnimated: 0 + - _MainFadeTextureAnimated: 0 + - _MainFadeTexturePanAnimated: 0 + - _MainFadeTextureUV: 0 + - _MainFadeTextureUVAnimated: 0 + - _MainHueShift: 0 + - _MainHueShiftAnimated: 0 + - _MainHueShiftMaskAnimated: 0 + - _MainHueShiftMaskPanAnimated: 0 + - _MainHueShiftMaskUV: 0 + - _MainHueShiftMaskUVAnimated: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftReplaceAnimated: 0 + - _MainHueShiftSpeed: 0 + - _MainHueShiftSpeedAnimated: 0 + - _MainHueShiftToggle: 0 + - _MainHueShiftToggleAnimated: 0 + - _MainMinAlpha: 0 + - _MainMinAlphaAnimated: 0 + - _MainMipScale: 0.25 + - _MainMipScaleAnimated: 0 + - _MainShadowClipMod: 0 + - _MainShadowClipModAnimated: 0 + - _MainTexAnimated: 0 + - _MainTexPanAnimated: 0 + - _MainTex_STAnimated: 0 + - _MainTextureUV: 0 + - _MainTextureUVAnimated: 0 + - _MainUseVertexColorAlpha: 0 + - _MainUseVertexColorAlphaAnimated: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringAnimated: 0 + - _Matcap2Add: 0 + - _Matcap2AddAnimated: 0 + - _Matcap2Animated: 0 + - _Matcap2Border: 0.43 + - _Matcap2BorderAnimated: 0 + - _Matcap2ColorAnimated: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2EmissionStrengthAnimated: 0 + - _Matcap2Enable: 0 + - _Matcap2EnableAnimated: 0 + - _Matcap2Intensity: 1 + - _Matcap2IntensityAnimated: 0 + - _Matcap2LightMask: 0 + - _Matcap2LightMaskAnimated: 0 + - _Matcap2MaskAnimated: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskInvertAnimated: 0 + - _Matcap2MaskPanAnimated: 0 + - _Matcap2MaskUV: 0 + - _Matcap2MaskUVAnimated: 0 + - _Matcap2Multiply: 0 + - _Matcap2MultiplyAnimated: 0 + - _Matcap2Normal: 1 + - _Matcap2NormalAnimated: 0 + - _Matcap2Replace: 0 + - _Matcap2ReplaceAnimated: 0 + - _MatcapAdd: 0 + - _MatcapAddAnimated: 0 + - _MatcapAnimated: 0 + - _MatcapBorder: 0.43 + - _MatcapBorderAnimated: 0 + - _MatcapColorAnimated: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEmissionStrengthAnimated: 0 + - _MatcapEnable: 0 + - _MatcapEnableAnimated: 0 + - _MatcapIntensity: 1 + - _MatcapIntensityAnimated: 0 + - _MatcapLightMask: 0 + - _MatcapLightMaskAnimated: 0 + - _MatcapMaskAnimated: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskInvertAnimated: 0 + - _MatcapMaskPanAnimated: 0 + - _MatcapMaskUV: 0 + - _MatcapMaskUVAnimated: 0 + - _MatcapMultiply: 0 + - _MatcapMultiplyAnimated: 0 + - _MatcapNormal: 1 + - _MatcapNormalAnimated: 0 + - _MatcapReplace: 1 + - _MatcapReplaceAnimated: 0 + - _MetalReflectionTintAnimated: 0 + - _Metallic: 0 + - _MetallicAnimated: 0 + - _MetallicMaskAnimated: 0 + - _MetallicMaskPanAnimated: 0 + - _MetallicMaskUV: 0 + - _MetallicMaskUVAnimated: 0 + - _MetallicTintMapAnimated: 0 + - _MetallicTintMapPanAnimated: 0 + - _MetallicTintMapUV: 0 + - _MetallicTintMapUVAnimated: 0 + - _Mirror: 0 + - _MirrorAnimated: 0 + - _MirrorTextureAnimated: 0 + - _MirrorTexturePanAnimated: 0 + - _MirrorTextureUV: 0 + - _MirrorTextureUVAnimated: 0 + - _Mode: 2 + - _ModelAngleMax: 90 + - _ModelAngleMaxAnimated: 0 + - _ModelAngleMin: 45 + - _ModelAngleMinAnimated: 0 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetFactorAnimated: 0 + - _OffsetUnits: 0 + - _OffsetUnitsAnimated: 0 + - _OutlineCull: 1 + - _OutlineCullAnimated: 0 + - _OutlineDropShadowOffsetAnimated: 0 + - _OutlineEmission: 0 + - _OutlineEmissionAnimated: 0 + - _OutlineFadeDistanceAnimated: 0 + - _OutlineFixedSize: 0 + - _OutlineFixedSizeAnimated: 0 + - _OutlineLit: 1 + - _OutlineLitAnimated: 0 + - _OutlineMaskAnimated: 0 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineModeAnimated: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlinePersonaDirectionAnimated: 0 + - _OutlineRimLightBlend: 0 + - _OutlineRimLightBlendAnimated: 0 + - _OutlineShadowStrength: 1 + - _OutlineShadowStrengthAnimated: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilCompareFunctionAnimated: 0 + - _OutlineStencilFailOp: 0 + - _OutlineStencilFailOpAnimated: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilPassOpAnimated: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilReadMaskAnimated: 0 + - _OutlineStencilRef: 0 + - _OutlineStencilRefAnimated: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilWriteMaskAnimated: 0 + - _OutlineStencilZFailOp: 0 + - _OutlineStencilZFailOpAnimated: 0 + - _OutlineTextureAnimated: 0 + - _OutlineTexturePanAnimated: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineTintMixAnimated: 0 + - _OutlineUseVertexColors: 0 + - _OutlineUseVertexColorsAnimated: 0 + - _PanoBlend: 0 + - _PanoBlendAnimated: 0 + - _PanoCubeMapAnimated: 0 + - _PanoCubeMapToggle: 0 + - _PanoCubeMapToggleAnimated: 0 + - _PanoEmission: 0 + - _PanoEmissionAnimated: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoInfiniteStereoToggleAnimated: 0 + - _PanoMaskAnimated: 0 + - _PanoMaskPanAnimated: 0 + - _PanoMaskUV: 0 + - _PanoMaskUVAnimated: 0 + - _PanoToggle: 0 + - _PanoToggleAnimated: 0 + - _PanosphereColorAnimated: 0 + - _PanospherePanAnimated: 0 + - _PanosphereTextureAnimated: 0 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxBiasAnimated: 0 + - _ParallaxHeightMapAnimated: 0 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapEnabledAnimated: 0 + - _ParallaxHeightMapMaskAnimated: 0 + - _ParallaxHeightMapMaskPanAnimated: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxHeightMapMaskUVAnimated: 0 + - _ParallaxHeightMapPanAnimated: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightFromAlphaAnimated: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalHeightmapModeAnimated: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalIterationsAnimated: 0 + - _ParallaxInternalMapAnimated: 0 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapEnabledAnimated: 0 + - _ParallaxInternalMapMaskAnimated: 0 + - _ParallaxInternalMapMaskPanAnimated: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMapMaskUVAnimated: 0 + - _ParallaxInternalMaxColorAnimated: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxDepthAnimated: 0 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMaxFadeAnimated: 0 + - _ParallaxInternalMinColorAnimated: 0 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinDepthAnimated: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxInternalMinFadeAnimated: 0 + - _ParallaxInternalPanDepthSpeedAnimated: 0 + - _ParallaxInternalPanSpeedAnimated: 0 + - _ParallaxMap: 0 + - _ParallaxMapAnimated: 0 + - _ParallaxStrength: 0 + - _ParallaxStrengthAnimated: 0 + - _ParallaxUV: 0 + - _ParallaxUVAnimated: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlendMultiplicativeAnimated: 0 + - _RGBBluePanningAnimated: 0 + - _RGBBlue_UV: 0 + - _RGBBlue_UVAnimated: 0 + - _RGBGreenPanningAnimated: 0 + - _RGBGreen_UV: 0 + - _RGBGreen_UVAnimated: 0 + - _RGBMaskAnimated: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskEnabledAnimated: 0 + - _RGBMaskPanningAnimated: 0 + - _RGBMaskUV: 0 + - _RGBMaskUVAnimated: 0 + - _RGBNormalBlend: 0 + - _RGBNormalBlendAnimated: 0 + - _RGBRedPanningAnimated: 0 + - _RGBRed_UV: 0 + - _RGBRed_UVAnimated: 0 + - _RGBUseVertexColors: 0 + - _RGBUseVertexColorsAnimated: 0 + - _RedColorAnimated: 0 + - _RedTexureAnimated: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionChromaticAberattionAnimated: 0 + - _RefractionEnabled: 0 + - _RefractionEnabledAnimated: 0 + - _RefractionIndex: 1.333333 + - _RefractionIndexAnimated: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimBrightenAnimated: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroBlurAnimated: 0 + - _RimEnviroIntensity: 1 + - _RimEnviroIntensityAnimated: 0 + - _RimEnviroMaskAnimated: 0 + - _RimEnviroMaskPanAnimated: 0 + - _RimEnviroMaskUV: 0 + - _RimEnviroMaskUVAnimated: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroMinBrightnessAnimated: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroSharpnessAnimated: 0 + - _RimEnviroWidth: 0.45 + - _RimEnviroWidthAnimated: 0 + - _RimLightColorAnimated: 0 + - _RimLightColorBias: 0 + - _RimLightColorBiasAnimated: 0 + - _RimLightNormal: 1 + - _RimLightNormalAnimated: 0 + - _RimLightingInvert: 0 + - _RimLightingInvertAnimated: 0 + - _RimMaskAnimated: 0 + - _RimMaskPanAnimated: 0 + - _RimMaskUV: 0 + - _RimMaskUVAnimated: 0 + - _RimSharpness: 0.25 + - _RimSharpnessAnimated: 0 + - _RimStrength: 0 + - _RimStrengthAnimated: 0 + - _RimTexAnimated: 0 + - _RimTexPanAnimated: 0 + - _RimTexUV: 0 + - _RimTexUVAnimated: 0 + - _RimWidth: 0.8 + - _RimWidthAnimated: 0 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseStrengthAnimated: 0 + - _RimWidthNoiseTextureAnimated: 0 + - _RimWidthNoiseTexturePanAnimated: 0 + - _RimWidthNoiseTextureUV: 0 + - _RimWidthNoiseTextureUVAnimated: 0 + - _SSSColorAnimated: 0 + - _SSSDistortion: 1 + - _SSSDistortionAnimated: 0 + - _SSSPower: 5 + - _SSSPowerAnimated: 0 + - _SSSSCale: 0.25 + - _SSSSCaleAnimated: 0 + - _SSSThicknessMapAnimated: 0 + - _SSSThicknessMapPanAnimated: 0 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMapUVAnimated: 0 + - _SSSThicknessMod: 0 + - _SSSThicknessModAnimated: 0 + - _SampleWorld: 0 + - _SampleWorldAnimated: 0 + - _Saturation: 0 + - _SaturationAnimated: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission1Animated: 0 + - _ScrollingEmissionAnimated: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixAnimated: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixThresholdAnimated: 0 + - _ShadowMixWidthMod: 0.5 + - _ShadowMixWidthModAnimated: 0 + - _ShadowOffset: 0 + - _ShadowOffsetAnimated: 0 + - _ShadowStrength: 1 + - _ShadowStrengthAnimated: 0 + - _Smoothness: 0 + - _SmoothnessAnimated: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessFrom1Animated: 0 + - _SmoothnessFromAnimated: 0 + - _SmoothnessMaskAnimated: 0 + - _SmoothnessMaskPanAnimated: 0 + - _SmoothnessMaskUV: 0 + - _SmoothnessMaskUVAnimated: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInAlphaAnimated: 0 + - _SpawnInEmissionColorAnimated: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInEmissionOffsetAnimated: 0 + - _SpawnInGradientFinishAnimated: 0 + - _SpawnInGradientStartAnimated: 0 + - _SpawnInNoiseAnimated: 0 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInNoiseIntensityAnimated: 0 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetAnimated: 0 + - _SpawnInVertOffsetOffset: 0.1 + - _SpawnInVertOffsetOffsetAnimated: 0 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec1Offset1Animated: 0 + - _Spec1OffsetAnimated: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _Spec2Smoothness1Animated: 0 + - _Spec2SmoothnessAnimated: 0 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecWhatTangent1Animated: 0 + - _SpecWhatTangentAnimated: 0 + - _SpecularAnisoJitterMacro1Animated: 0 + - _SpecularAnisoJitterMacro1PanAnimated: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacro1UVAnimated: 0 + - _SpecularAnisoJitterMacroAnimated: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroMultiplier1Animated: 0 + - _SpecularAnisoJitterMacroMultiplierAnimated: 0 + - _SpecularAnisoJitterMacroPanAnimated: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMacroUVAnimated: 0 + - _SpecularAnisoJitterMicro1Animated: 0 + - _SpecularAnisoJitterMicro1PanAnimated: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicro1UVAnimated: 0 + - _SpecularAnisoJitterMicroAnimated: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroMultiplier1Animated: 0 + - _SpecularAnisoJitterMicroMultiplierAnimated: 0 + - _SpecularAnisoJitterMicroPanAnimated: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMicroUVAnimated: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularAnisoJitterMirrored1Animated: 0 + - _SpecularAnisoJitterMirroredAnimated: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularInvertSmoothness1Animated: 0 + - _SpecularInvertSmoothnessAnimated: 0 + - _SpecularMap1Animated: 0 + - _SpecularMap1PanAnimated: 0 + - _SpecularMap1UV: 0 + - _SpecularMap1UVAnimated: 0 + - _SpecularMapAnimated: 0 + - _SpecularMapPanAnimated: 0 + - _SpecularMapUV: 0 + - _SpecularMapUVAnimated: 0 + - _SpecularMask1Animated: 0 + - _SpecularMask1PanAnimated: 0 + - _SpecularMask1UV: 0 + - _SpecularMask1UVAnimated: 0 + - _SpecularMaskAnimated: 0 + - _SpecularMaskPanAnimated: 0 + - _SpecularMaskUV: 0 + - _SpecularMaskUVAnimated: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallic1Animated: 0 + - _SpecularMetallicAnimated: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularNormal1Animated: 0 + - _SpecularNormalAnimated: 0 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularSmoothness1Animated: 0 + - _SpecularSmoothnessAnimated: 0 + - _SpecularTint1Animated: 0 + - _SpecularTintAnimated: 0 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonEnd1Animated: 0 + - _SpecularToonEndAnimated: 0 + - _SpecularToonInnerOuter1Animated: 0 + - _SpecularToonInnerOuterAnimated: 0 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularToonStart1Animated: 0 + - _SpecularToonStartAnimated: 0 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SpecularType1Animated: 0 + - _SpecularTypeAnimated: 0 + - _SrcBlend: 5 + - _SrcBlendAnimated: 0 + - _StencilCompareFunction: 6 + - _StencilCompareFunctionAnimated: 0 + - _StencilFailOp: 0 + - _StencilFailOpAnimated: 0 + - _StencilPassOp: 0 + - _StencilPassOpAnimated: 0 + - _StencilReadMask: 255 + - _StencilReadMaskAnimated: 0 + - _StencilRef: 12 + - _StencilRefAnimated: 0 + - _StencilWriteMask: 255 + - _StencilWriteMaskAnimated: 0 + - _StencilZFailOp: 0 + - _StencilZFailOpAnimated: 0 + - _TextEnabled: 0 + - _TextEnabledAnimated: 0 + - _TextFPSColorAnimated: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEmissionStrengthAnimated: 0 + - _TextFPSEnabled: 0 + - _TextFPSEnabledAnimated: 0 + - _TextFPSOffsetAnimated: 0 + - _TextFPSPaddingAnimated: 0 + - _TextFPSRotation: 0 + - _TextFPSRotationAnimated: 0 + - _TextFPSScaleAnimated: 0 + - _TextFPSUV: 0 + - _TextFPSUVAnimated: 0 + - _TextGlyphsAnimated: 0 + - _TextPixelRange: 4 + - _TextPixelRangeAnimated: 0 + - _TextPositionColorAnimated: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEmissionStrengthAnimated: 0 + - _TextPositionEnabled: 0 + - _TextPositionEnabledAnimated: 0 + - _TextPositionOffsetAnimated: 0 + - _TextPositionPaddingAnimated: 0 + - _TextPositionRotation: 0 + - _TextPositionRotationAnimated: 0 + - _TextPositionScaleAnimated: 0 + - _TextPositionUV: 0 + - _TextPositionUVAnimated: 0 + - _TextTimeColorAnimated: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEmissionStrengthAnimated: 0 + - _TextTimeEnabled: 0 + - _TextTimeEnabledAnimated: 0 + - _TextTimeOffsetAnimated: 0 + - _TextTimePaddingAnimated: 0 + - _TextTimeRotation: 0 + - _TextTimeRotationAnimated: 0 + - _TextTimeScaleAnimated: 0 + - _TextTimeUV: 0 + - _TextTimeUVAnimated: 0 + - _ToonRampAnimated: 0 + - _UVSec: 0 + - _UseShadowTexture: 0 + - _UseShadowTextureAnimated: 0 + - _Use_1stAs2nd: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchFrequencyAnimated: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchStrengthAnimated: 0 + - _VertexGlitchThreshold: 1 + - _VertexGlitchThresholdAnimated: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightAnimated: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightBiasAnimated: 0 + - _VertexManipulationHeightMaskAnimated: 0 + - _VertexManipulationHeightPanAnimated: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationHeightUVAnimated: 0 + - _VertexManipulationLocalRotationAnimated: 0 + - _VertexManipulationLocalScaleAnimated: 0 + - _VertexManipulationLocalTranslationAnimated: 0 + - _VertexManipulationWorldTranslationAnimated: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingDivisionAnimated: 0 + - _VertexRoundingEnabled: 0 + - _VertexRoundingEnabledAnimated: 0 + - _VertexUnwrap: 0 + - _VertexUnwrapAnimated: 0 + - _VideoBacklight: 1 + - _VideoBacklightAnimated: 0 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTPixelEnergizedTimeAnimated: 0 + - _VideoCRTRefreshRate: 24 + - _VideoCRTRefreshRateAnimated: 0 + - _VideoContrast: 0 + - _VideoContrastAnimated: 0 + - _VideoDebugTextureAnimated: 0 + - _VideoEnableDebug: 0 + - _VideoEnableDebugAnimated: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoEnableVideoPlayerAnimated: 0 + - _VideoGameboyRampAnimated: 0 + - _VideoMaskPanningAnimated: 0 + - _VideoMaskTextureAnimated: 0 + - _VideoOffsetAnimated: 0 + - _VideoPanningAnimated: 0 + - _VideoPixelTextureAnimated: 0 + - _VideoPixelateToResolution: 0 + - _VideoPixelateToResolutionAnimated: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoRepeatVideoTextureAnimated: 0 + - _VideoResolutionAnimated: 0 + - _VideoSaturation: 0 + - _VideoSaturationAnimated: 0 + - _VideoTilingAnimated: 0 + - _VideoType: 3 + - _VideoTypeAnimated: 0 + - _VideoUVNumber: 0 + - _VideoUVNumberAnimated: 0 + - _VoronoiBlend: 0 + - _VoronoiBlendAnimated: 0 + - _VoronoiColor0Animated: 0 + - _VoronoiColor1Animated: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEffectsMaterialAlphaAnimated: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission0Animated: 0 + - _VoronoiEmission1: 0 + - _VoronoiEmission1Animated: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiEnableRandomCellColorAnimated: 0 + - _VoronoiGradientAnimated: 0 + - _VoronoiMaskAnimated: 0 + - _VoronoiMaskPanAnimated: 0 + - _VoronoiMaskUV: 0 + - _VoronoiMaskUVAnimated: 0 + - _VoronoiNoiseAnimated: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseIntensityAnimated: 0 + - _VoronoiNoisePanAnimated: 0 + - _VoronoiNoiseUV: 0 + - _VoronoiNoiseUVAnimated: 0 + - _VoronoiRandomMinMaxBrightnessAnimated: 0 + - _VoronoiRandomMinMaxSaturationAnimated: 0 + - _VoronoiScale: 5 + - _VoronoiScaleAnimated: 0 + - _VoronoiSpace: 0 + - _VoronoiSpaceAnimated: 0 + - _VoronoiSpeedAnimated: 0 + - _VoronoiType: 1 + - _VoronoiTypeAnimated: 0 + - _ZTest: 4 + - _ZTestAnimated: 0 + - _ZWrite: 0 + - _ZWriteAnimated: 0 + - _commentIfZero_EnableGrabpass: 0 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _commentIfZero_LightingAdditiveEnableAnimated: 0 + - _glitterFrequencyLinearEmissive: 20 + - _glitterFrequencyLinearEmissiveAnimated: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_LockingInfo: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_Special_Effects: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_clearCoat: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_glitter: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pointToPoint: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_shadowTexture: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 0 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 1 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 1 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_clearCoat: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_glitter: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pointToPoint: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_shadowTexture: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainDistanceFade: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainHueShiftMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat.meta new file mode 100644 index 00000000..34260e9b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/inside.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30f4ef6c54f791c4a81aad0db95bdd5e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat new file mode 100644 index 00000000..09e3de98 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat @@ -0,0 +1,2096 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: outside + m_Shader: {fileID: 4800000, guid: 917b37092bae034459c28c00a3a19b54, type: 3} + m_ShaderKeywords: VIGNETTE_MASKED _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainHueShiftMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: a6d6984545cde4a4f9317b17d6dca225, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1st_ShadeMapUV: 0 + - _2nd_ShadeMapUV: 0 + - _AOStrength: 1 + - _AOStrengthAnimated: 0 + - _AlphaMaskAnimated: 0 + - _AlphaMaskPanAnimated: 0 + - _AlphaMaskUV: 0 + - _AlphaMaskUVAnimated: 0 + - _AlphaMod: 0 + - _AlphaModAnimated: 0 + - _AlphaPremultiply: 0 + - _AlphaPremultiplyAnimated: 0 + - _AlphaToMask: 0 + - _AlphaToMaskAnimated: 0 + - _AngleCompareTo: 0 + - _AngleCompareToAnimated: 0 + - _AngleForwardDirectionAnimated: 0 + - _AngleMinAlpha: 0 + - _AngleMinAlphaAnimated: 0 + - _AngleType: 0 + - _AngleTypeAnimated: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec1Alpha1Animated: 0 + - _AnisoSpec1AlphaAnimated: 0 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoSpec2Alpha1Animated: 0 + - _AnisoSpec2AlphaAnimated: 0 + - _AnisoTangentMap1Animated: 0 + - _AnisoTangentMap1PanAnimated: 0 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMap1UVAnimated: 0 + - _AnisoTangentMapAnimated: 0 + - _AnisoTangentMapPanAnimated: 0 + - _AnisoTangentMapUV: 0 + - _AnisoTangentMapUVAnimated: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AnisoUseTangentMap1Animated: 0 + - _AnisoUseTangentMapAnimated: 0 + - _AttenuationMultiplier: 0 + - _AttenuationMultiplierAnimated: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskClearCoatAnimated: 0 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDebugAnimated: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskDissolveAnimated: 0 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEmission2Animated: 0 + - _BlackLightMaskEmissionAnimated: 0 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskEnabledAnimated: 0 + - _BlackLightMaskEndAnimated: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskFlipbookAnimated: 0 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskGlitterAnimated: 0 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskIridescenceAnimated: 0 + - _BlackLightMaskKeysAnimated: 0 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMatcap2Animated: 0 + - _BlackLightMaskMatcapAnimated: 0 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskMetallicAnimated: 0 + - _BlackLightMaskPanosphere: 4 + - _BlackLightMaskPanosphereAnimated: 0 + - _BlackLightMaskStartAnimated: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendOpAlphaAnimated: 0 + - _BlendOpAnimated: 0 + - _BlueColorAnimated: 0 + - _BlueTextureAnimated: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeFadeLengthAnimated: 0 + - _BuldgeHeight: 0.02 + - _BuldgeHeightAnimated: 0 + - _BulgeMaskAnimated: 0 + - _BumpMapAnimated: 0 + - _BumpMapPanAnimated: 0 + - _BumpMapUV: 0 + - _BumpMapUVAnimated: 0 + - _BumpScale: 1 + - _BumpScaleAnimated: 0 + - _CameraAngleMax: 90 + - _CameraAngleMaxAnimated: 0 + - _CameraAngleMin: 45 + - _CameraAngleMinAnimated: 0 + - _ClearCoat: 1 + - _ClearCoatAnimated: 0 + - _ClearCoatCubeMapAnimated: 0 + - _ClearCoatForceLighting: 0 + - _ClearCoatForceLightingAnimated: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatInvertSmoothnessAnimated: 0 + - _ClearCoatMaskAnimated: 0 + - _ClearCoatMaskPanAnimated: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatMaskUVAnimated: 0 + - _ClearCoatNormalToUse: 0 + - _ClearCoatNormalToUseAnimated: 0 + - _ClearCoatSampleWorld: 0 + - _ClearCoatSampleWorldAnimated: 0 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessAnimated: 0 + - _ClearCoatSmoothnessMapAnimated: 0 + - _ClearCoatSmoothnessMapPanAnimated: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatSmoothnessMapUVAnimated: 0 + - _ClearCoatTintAnimated: 0 + - _ColorAnimated: 0 + - _ColorMask: 15 + - _ColorMaskAnimated: 0 + - _ContinuousDissolve: 0 + - _ContinuousDissolveAnimated: 0 + - _CubeMapAnimated: 0 + - _Cull: 2 + - _CullAnimated: 0 + - _Cutoff: 0 + - _CutoffAnimated: 0 + - _DebugCameraData: 0 + - _DebugCameraDataAnimated: 0 + - _DebugEnabled: 0 + - _DebugLightingData: 0 + - _DebugLightingDataAnimated: 0 + - _DebugMeshData: 0 + - _DebugMeshDataAnimated: 0 + - _DecalBlendAdd: 0 + - _DecalBlendAddAnimated: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlphaAnimated: 0 + - _DecalBlendMultiply: 0 + - _DecalBlendMultiplyAnimated: 0 + - _DecalBlendReplace: 0 + - _DecalBlendReplaceAnimated: 0 + - _DecalBlendType: 0 + - _DecalBlendTypeAnimated: 0 + - _DecalColorAnimated: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrengthAnimated: 0 + - _DecalEnabled: 0 + - _DecalEnabledAnimated: 0 + - _DecalMaskAnimated: 0 + - _DecalMaskPanAnimated: 0 + - _DecalMaskUV: 0 + - _DecalMaskUVAnimated: 0 + - _DecalPositionAnimated: 0 + - _DecalRotation: 0 + - _DecalRotationAnimated: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeedAnimated: 0 + - _DecalScaleAnimated: 0 + - _DecalTextureAnimated: 0 + - _DecalTexturePanAnimated: 0 + - _DecalTextureUV: 0 + - _DecalTextureUVAnimated: 0 + - _DecalTiled: 0 + - _DecalTiledAnimated: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxAnimated: 0 + - _DepthAlphaMin: 1 + - _DepthAlphaMinAnimated: 0 + - _DepthGlowColorAnimated: 0 + - _DepthGlowEmission: 3 + - _DepthGlowEmissionAnimated: 0 + - _DepthGradientAnimated: 0 + - _DepthGradientBlend: 0 + - _DepthGradientBlendAnimated: 0 + - _DepthGradientPanAnimated: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientTextureUVAnimated: 0 + - _DepthGradientUV: 0 + - _DepthGradientUVAnimated: 0 + - _DepthMaskAnimated: 0 + - _DepthMaskPanAnimated: 0 + - _DepthMaskUV: 0 + - _DepthMaskUVAnimated: 0 + - _DestinationBlend: 10 + - _DetailBrightness: 1 + - _DetailBrightnessAnimated: 0 + - _DetailEnabled: 0 + - _DetailMaskAnimated: 0 + - _DetailMaskPanAnimated: 0 + - _DetailMaskUV: 0 + - _DetailMaskUVAnimated: 0 + - _DetailNormalMapAnimated: 0 + - _DetailNormalMapPanAnimated: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapScaleAnimated: 0 + - _DetailNormalMapUV: 0 + - _DetailNormalMapUVAnimated: 0 + - _DetailTexAnimated: 0 + - _DetailTexIntensity: 1 + - _DetailTexIntensityAnimated: 0 + - _DetailTexPanAnimated: 0 + - _DetailTexUV: 0 + - _DetailTexUVAnimated: 0 + - _DetailTintAnimated: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha0Animated: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha1Animated: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha2Animated: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha3Animated: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha4Animated: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha5Animated: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha6Animated: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha7Animated: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha8Animated: 0 + - _DissolveAlpha9: 0 + - _DissolveAlpha9Animated: 0 + - _DissolveAlphaAnimated: 0 + - _DissolveDetailNoiseAnimated: 0 + - _DissolveDetailNoisePanAnimated: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailNoiseUVAnimated: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveDetailStrengthAnimated: 0 + - _DissolveEdgeColorAnimated: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeEmissionAnimated: 0 + - _DissolveEdgeGradientAnimated: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHardnessAnimated: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEdgeWidthAnimated: 0 + - _DissolveEmission1Side: 2 + - _DissolveEmission1SideAnimated: 0 + - _DissolveEmissionSide: 2 + - _DissolveEmissionSideAnimated: 0 + - _DissolveEndPointAnimated: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertDetailNoiseAnimated: 0 + - _DissolveInvertNoise: 0 + - _DissolveInvertNoiseAnimated: 0 + - _DissolveMaskAnimated: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskInvertAnimated: 0 + - _DissolveMaskPanAnimated: 0 + - _DissolveMaskUV: 0 + - _DissolveMaskUVAnimated: 0 + - _DissolveNoiseTextureAnimated: 0 + - _DissolveNoiseTexturePanAnimated: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveNoiseTextureUVAnimated: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PEdgeLengthAnimated: 0 + - _DissolveP2PWorldLocal: 0 + - _DissolveP2PWorldLocalAnimated: 0 + - _DissolveStartPointAnimated: 0 + - _DissolveTextureColorAnimated: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToEmissionStrengthAnimated: 0 + - _DissolveToTextureAnimated: 0 + - _DissolveToTexturePanAnimated: 0 + - _DissolveToTextureUV: 0 + - _DissolveToTextureUVAnimated: 0 + - _DissolveType: 1 + - _DissolveTypeAnimated: 0 + - _DissolveUseVertexColors: 0 + - _DissolveUseVertexColorsAnimated: 0 + - _DistortionFlowTexture1Animated: 0 + - _DistortionFlowTextureAnimated: 0 + - _DistortionMaskAnimated: 0 + - _DistortionMaskPanAnimated: 0 + - _DistortionMaskUV: 0 + - _DistortionMaskUVAnimated: 0 + - _DistortionSpeed1Animated: 0 + - _DistortionSpeedAnimated: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1Animated: 0 + - _DistortionStrengthAnimated: 0 + - _DitherGradient: 0.1 + - _DitherGradientAnimated: 0 + - _DitheringEnabled: 0 + - _DitheringEnabledAnimated: 0 + - _DstBlend: 10 + - _DstBlendAnimated: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap1Animated: 0 + - _EmissionBaseColorAsMapAnimated: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabledAnimated: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset1Animated: 0 + - _EmissionBlinkingOffsetAnimated: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled1Animated: 0 + - _EmissionCenterOutEnabledAnimated: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed1Animated: 0 + - _EmissionCenterOutSpeedAnimated: 0 + - _EmissionColor1Animated: 0 + - _EmissionColorAnimated: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift1Animated: 0 + - _EmissionHueShiftAnimated: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled1Animated: 0 + - _EmissionHueShiftEnabledAnimated: 0 + - _EmissionMap1Animated: 0 + - _EmissionMap1PanAnimated: 0 + - _EmissionMap1UV: 0 + - _EmissionMap1UVAnimated: 0 + - _EmissionMapAnimated: 0 + - _EmissionMapPanAnimated: 0 + - _EmissionMapUV: 0 + - _EmissionMapUVAnimated: 0 + - _EmissionMask1Animated: 0 + - _EmissionMask1PanAnimated: 0 + - _EmissionMask1UV: 0 + - _EmissionMask1UVAnimated: 0 + - _EmissionMaskAnimated: 0 + - _EmissionMaskPanAnimated: 0 + - _EmissionMaskUV: 0 + - _EmissionMaskUVAnimated: 0 + - _EmissionReplace: 0 + - _EmissionReplaceAnimated: 0 + - _EmissionScrollingCurve1Animated: 0 + - _EmissionScrollingCurveAnimated: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingOffset1Animated: 0 + - _EmissionScrollingOffsetAnimated: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve1Animated: 0 + - _EmissionScrollingUseCurveAnimated: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor1Animated: 0 + - _EmissionScrollingVertexColorAnimated: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength1Animated: 0 + - _EmissionStrengthAnimated: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max1Animated: 0 + - _EmissiveBlink_MaxAnimated: 0 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min1Animated: 0 + - _EmissiveBlink_MinAnimated: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity1Animated: 0 + - _EmissiveBlink_VelocityAnimated: 0 + - _EmissiveScroll_Direction1Animated: 0 + - _EmissiveScroll_DirectionAnimated: 0 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval1Animated: 0 + - _EmissiveScroll_IntervalAnimated: 0 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity1Animated: 0 + - _EmissiveScroll_VelocityAnimated: 0 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width1Animated: 0 + - _EmissiveScroll_WidthAnimated: 0 + - _EnableBlur: 0 + - _EnableBlurAnimated: 0 + - _EnableBulge: 0 + - _EnableBulgeAnimated: 0 + - _EnableClearCoat: 0 + - _EnableClearCoatAnimated: 0 + - _EnableDissolve: 0 + - _EnableDissolveAnimated: 0 + - _EnableDistortion: 0 + - _EnableDistortionAnimated: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1Animated: 0 + - _EnableEmissionAnimated: 0 + - _EnableEnvironmentalRim: 0 + - _EnableEnvironmentalRimAnimated: 0 + - _EnableFlipbook: 0 + - _EnableFlipbookAnimated: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission1Animated: 0 + - _EnableGITDEmissionAnimated: 0 + - _EnableHolo: 0 + - _EnableHoloAnimated: 0 + - _EnableIridescence: 0 + - _EnableIridescenceAnimated: 0 + - _EnableLighting: 1 + - _EnableLightingAnimated: 0 + - _EnableMetallic: 0 + - _EnableMetallicAnimated: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorOptionsAnimated: 0 + - _EnableMirrorTexture: 0 + - _EnableMirrorTextureAnimated: 0 + - _EnableRandom: 0 + - _EnableRandomAnimated: 0 + - _EnableRimLighting: 0 + - _EnableRimLightingAnimated: 0 + - _EnableSSS: 0 + - _EnableSSSAnimated: 0 + - _EnableScifiSpawnIn: 0 + - _EnableScifiSpawnInAnimated: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableSpecular1Animated: 0 + - _EnableSpecularAnimated: 0 + - _EnableTouchGlow: 0 + - _EnableTouchGlowAnimated: 0 + - _EnableVertexGlitch: 0 + - _EnableVertexGlitchAnimated: 0 + - _EnableVideo: 0 + - _EnableVideoAnimated: 0 + - _EnableVoronoi: 0 + - _EnableVoronoiAnimated: 0 + - _FadeLength: 20 + - _FadeLengthAnimated: 0 + - _FlipbookAdd: 0 + - _FlipbookAddAnimated: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookAlphaControlsFinalAlphaAnimated: 0 + - _FlipbookColorAnimated: 0 + - _FlipbookColorReplaces: 0 + - _FlipbookColorReplacesAnimated: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookCurrentFrameAnimated: 0 + - _FlipbookEmissionStrength: 0 + - _FlipbookEmissionStrengthAnimated: 0 + - _FlipbookFPS: 30 + - _FlipbookFPSAnimated: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookIntensityControlsAlphaAnimated: 0 + - _FlipbookMaskAnimated: 0 + - _FlipbookMaskPanAnimated: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMaskUVAnimated: 0 + - _FlipbookMultiply: 0 + - _FlipbookMultiplyAnimated: 0 + - _FlipbookReplace: 1 + - _FlipbookReplaceAnimated: 0 + - _FlipbookRotation: 0 + - _FlipbookRotationAnimated: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookRotationSpeedAnimated: 0 + - _FlipbookScaleOffsetAnimated: 0 + - _FlipbookTexArrayAnimated: 0 + - _FlipbookTexArrayPanAnimated: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTexArrayUVAnimated: 0 + - _FlipbookTiled: 0 + - _FlipbookTiledAnimated: 0 + - _FlipbookTotalFrames: 1 + - _FlipbookTotalFramesAnimated: 0 + - _ForceOpaque: 0 + - _ForceOpaqueAnimated: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier1Animated: 0 + - _GITDEMaxEmissionMultiplierAnimated: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight1Animated: 0 + - _GITDEMaxLightAnimated: 0 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier1Animated: 0 + - _GITDEMinEmissionMultiplierAnimated: 0 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight1Animated: 0 + - _GITDEMinLightAnimated: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh1Animated: 0 + - _GITDEWorldOrMeshAnimated: 0 + - _GlitterAngleRange: 90 + - _GlitterAngleRangeAnimated: 0 + - _GlitterBias: 0.8 + - _GlitterBiasAnimated: 0 + - _GlitterBlendType: 0 + - _GlitterBlendTypeAnimated: 0 + - _GlitterBrightness: 3 + - _GlitterBrightnessAnimated: 0 + - _GlitterCenterSize: 0.08 + - _GlitterCenterSizeAnimated: 0 + - _GlitterColorAnimated: 0 + - _GlitterColorMapAnimated: 0 + - _GlitterColorMapPanAnimated: 0 + - _GlitterColorMapUV: 0 + - _GlitterColorMapUVAnimated: 0 + - _GlitterContrast: 300 + - _GlitterContrastAnimated: 0 + - _GlitterEnable: 0 + - _GlitterEnableAnimated: 0 + - _GlitterFrequency: 300 + - _GlitterFrequencyAnimated: 0 + - _GlitterJaggyFix: 0 + - _GlitterJaggyFixAnimated: 0 + - _GlitterJitter: 1 + - _GlitterJitterAnimated: 0 + - _GlitterMaskAnimated: 0 + - _GlitterMaskPanAnimated: 0 + - _GlitterMaskUV: 0 + - _GlitterMaskUVAnimated: 0 + - _GlitterMinBrightness: 0 + - _GlitterMinBrightnessAnimated: 0 + - _GlitterMinMaxBrightnessAnimated: 0 + - _GlitterMinMaxSaturationAnimated: 0 + - _GlitterMinMaxSizeAnimated: 0 + - _GlitterMode: 0 + - _GlitterModeAnimated: 0 + - _GlitterPanAnimated: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomColorsAnimated: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomRotationAnimated: 0 + - _GlitterRandomSize: 0 + - _GlitterRandomSizeAnimated: 0 + - _GlitterShape: 0 + - _GlitterShapeAnimated: 0 + - _GlitterSize: 0.3 + - _GlitterSizeAnimated: 0 + - _GlitterSpeed: 10 + - _GlitterSpeedAnimated: 0 + - _GlitterTextureAnimated: 0 + - _GlitterTexturePanAnimated: 0 + - _GlitterTextureRotation: 0 + - _GlitterTextureRotationAnimated: 0 + - _GlitterUseSurfaceColor: 0 + - _GlitterUseSurfaceColorAnimated: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _GrabBlurDirections: 4 + - _GrabBlurDirectionsAnimated: 0 + - _GrabBlurDistance: 0 + - _GrabBlurDistanceAnimated: 0 + - _GrabBlurQuality: 2 + - _GrabBlurQualityAnimated: 0 + - _GrabDstBlend: 0 + - _GrabDstBlendAnimated: 0 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendFactorAnimated: 0 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabPassUseAlphaAnimated: 0 + - _GrabSrcBlend: 2 + - _GrabSrcBlendAnimated: 0 + - _GreenColorAnimated: 0 + - _GreenTextureAnimated: 0 + - _HelpBoxHideLocking: 0 + - _HelpBoxLocking: 0 + - _HoloAlphaMapAnimated: 0 + - _HoloCoordinateSpace: 0 + - _HoloCoordinateSpaceAnimated: 0 + - _HoloDirectionAnimated: 0 + - _HoloFresnelAlpha: 0 + - _HoloFresnelAlphaAnimated: 0 + - _HoloLineDensity: 10 + - _HoloLineDensityAnimated: 0 + - _HoloRimSharpness: 0.5 + - _HoloRimSharpnessAnimated: 0 + - _HoloRimWidth: 0.5 + - _HoloRimWidthAnimated: 0 + - _HoloScrollSpeed: 1 + - _HoloScrollSpeedAnimated: 0 + - _IgnoreFog: 0 + - _IgnoreFogAnimated: 0 + - _InvertSmoothness: 0 + - _InvertSmoothnessAnimated: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAddBlendAnimated: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceEmissionStrengthAnimated: 0 + - _IridescenceIntensity: 1 + - _IridescenceIntensityAnimated: 0 + - _IridescenceMaskAnimated: 0 + - _IridescenceMaskUV: 0 + - _IridescenceMaskUVAnimated: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceMultiplyBlendAnimated: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalIntensityAnimated: 0 + - _IridescenceNormalMapAnimated: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalSelectionAnimated: 0 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalToggleAnimated: 0 + - _IridescenceNormalUV: 0 + - _IridescenceNormalUVAnimated: 0 + - _IridescenceRampAnimated: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceReplaceBlendAnimated: 0 + - _IridescenceTime: 0 + - _IridescenceTimeAnimated: 0 + - _LightingAOTexAnimated: 0 + - _LightingAOTexPanAnimated: 0 + - _LightingAOTexUV: 0 + - _LightingAOTexUVAnimated: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveDetailStrengthAnimated: 0 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientEndAnimated: 0 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveGradientStartAnimated: 0 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimitIntensityAnimated: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMaxIntensityAnimated: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditivePassthroughAnimated: 0 + - _LightingAdditiveType: 1 + - _LightingAdditiveTypeAnimated: 0 + - _LightingDetailShadowsAnimated: 0 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsEnabledAnimated: 0 + - _LightingDetailShadowsPanAnimated: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailShadowsUVAnimated: 0 + - _LightingDetailStrength: 1 + - _LightingDetailStrengthAnimated: 0 + - _LightingDirectColorMode: 0 + - _LightingDirectColorModeAnimated: 0 + - _LightingEnableAO: 0 + - _LightingEnableAOAnimated: 0 + - _LightingEnableHSL: 0 + - _LightingEnableHSLAnimated: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndAnimated: 0 + - _LightingGradientStart: 0 + - _LightingGradientStartAnimated: 0 + - _LightingHSLIntensity: 1 + - _LightingHSLIntensityAnimated: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIgnoreAmbientColorAnimated: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectColorModeAnimated: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightBrightnessAnimated: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMinShadowBrightnessRatioAnimated: 0 + - _LightingMode: 0 + - _LightingModeAnimated: 0 + - _LightingMonochromatic: 0 + - _LightingMonochromaticAnimated: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingOnlyUnityShadowsAnimated: 0 + - _LightingRampType: 0 + - _LightingRampTypeAnimated: 0 + - _LightingShadingEnabled: 0 + - _LightingShadingEnabledAnimated: 0 + - _LightingShadowColorAnimated: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowHueAnimated: 0 + - _LightingShadowLightness: 0.5 + - _LightingShadowLightnessAnimated: 0 + - _LightingShadowMaskAnimated: 0 + - _LightingShadowMaskPanAnimated: 0 + - _LightingShadowMaskUV: 0 + - _LightingShadowMaskUVAnimated: 0 + - _LightingShadowSaturation: 0.5 + - _LightingShadowSaturationAnimated: 0 + - _LightingShadowTextureAnimated: 0 + - _LightingShadowTexturePanAnimated: 0 + - _LightingShadowTextureUV: 0 + - _LightingShadowTextureUVAnimated: 0 + - _LightingStandardSmoothness: 0 + - _LightingStandardSmoothnessAnimated: 0 + - _LightingUncapped: 0 + - _LightingUncappedAnimated: 0 + - _LineColorAnimated: 0 + - _LineWidth: 0 + - _LineWidthAnimated: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainAlphaToCoverageAnimated: 0 + - _MainDistanceFadeAnimated: 0 + - _MainEmissionStrength: 0 + - _MainEmissionStrengthAnimated: 0 + - _MainFadeTextureAnimated: 0 + - _MainFadeTexturePanAnimated: 0 + - _MainFadeTextureUV: 0 + - _MainFadeTextureUVAnimated: 0 + - _MainHueShift: 0 + - _MainHueShiftAnimated: 0 + - _MainHueShiftMaskAnimated: 0 + - _MainHueShiftMaskPanAnimated: 0 + - _MainHueShiftMaskUV: 0 + - _MainHueShiftMaskUVAnimated: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftReplaceAnimated: 0 + - _MainHueShiftSpeed: 0 + - _MainHueShiftSpeedAnimated: 0 + - _MainHueShiftToggle: 0 + - _MainHueShiftToggleAnimated: 0 + - _MainMinAlpha: 0 + - _MainMinAlphaAnimated: 0 + - _MainMipScale: 0.25 + - _MainMipScaleAnimated: 0 + - _MainShadowClipMod: 0 + - _MainShadowClipModAnimated: 0 + - _MainTexAnimated: 0 + - _MainTexPanAnimated: 0 + - _MainTex_STAnimated: 0 + - _MainTextureUV: 0 + - _MainTextureUVAnimated: 0 + - _MainUseVertexColorAlpha: 0 + - _MainUseVertexColorAlphaAnimated: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringAnimated: 0 + - _Matcap2Add: 0 + - _Matcap2AddAnimated: 0 + - _Matcap2Animated: 0 + - _Matcap2Border: 0.43 + - _Matcap2BorderAnimated: 0 + - _Matcap2ColorAnimated: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2EmissionStrengthAnimated: 0 + - _Matcap2Enable: 0 + - _Matcap2EnableAnimated: 0 + - _Matcap2Intensity: 1 + - _Matcap2IntensityAnimated: 0 + - _Matcap2LightMask: 0 + - _Matcap2LightMaskAnimated: 0 + - _Matcap2MaskAnimated: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskInvertAnimated: 0 + - _Matcap2MaskPanAnimated: 0 + - _Matcap2MaskUV: 0 + - _Matcap2MaskUVAnimated: 0 + - _Matcap2Multiply: 0 + - _Matcap2MultiplyAnimated: 0 + - _Matcap2Normal: 1 + - _Matcap2NormalAnimated: 0 + - _Matcap2Replace: 0 + - _Matcap2ReplaceAnimated: 0 + - _MatcapAdd: 0 + - _MatcapAddAnimated: 0 + - _MatcapAnimated: 0 + - _MatcapBorder: 0.43 + - _MatcapBorderAnimated: 0 + - _MatcapColorAnimated: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEmissionStrengthAnimated: 0 + - _MatcapEnable: 0 + - _MatcapEnableAnimated: 0 + - _MatcapIntensity: 1 + - _MatcapIntensityAnimated: 0 + - _MatcapLightMask: 0 + - _MatcapLightMaskAnimated: 0 + - _MatcapMaskAnimated: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskInvertAnimated: 0 + - _MatcapMaskPanAnimated: 0 + - _MatcapMaskUV: 0 + - _MatcapMaskUVAnimated: 0 + - _MatcapMultiply: 0 + - _MatcapMultiplyAnimated: 0 + - _MatcapNormal: 1 + - _MatcapNormalAnimated: 0 + - _MatcapReplace: 1 + - _MatcapReplaceAnimated: 0 + - _MetalReflectionTintAnimated: 0 + - _Metallic: 0 + - _MetallicAnimated: 0 + - _MetallicMaskAnimated: 0 + - _MetallicMaskPanAnimated: 0 + - _MetallicMaskUV: 0 + - _MetallicMaskUVAnimated: 0 + - _MetallicTintMapAnimated: 0 + - _MetallicTintMapPanAnimated: 0 + - _MetallicTintMapUV: 0 + - _MetallicTintMapUVAnimated: 0 + - _Mirror: 0 + - _MirrorAnimated: 0 + - _MirrorTextureAnimated: 0 + - _MirrorTexturePanAnimated: 0 + - _MirrorTextureUV: 0 + - _MirrorTextureUVAnimated: 0 + - _Mode: 2 + - _ModelAngleMax: 90 + - _ModelAngleMaxAnimated: 0 + - _ModelAngleMin: 45 + - _ModelAngleMinAnimated: 0 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetFactorAnimated: 0 + - _OffsetUnits: 0 + - _OffsetUnitsAnimated: 0 + - _OutlineCull: 1 + - _OutlineCullAnimated: 0 + - _OutlineDropShadowOffsetAnimated: 0 + - _OutlineEmission: 0 + - _OutlineEmissionAnimated: 0 + - _OutlineFadeDistanceAnimated: 0 + - _OutlineFixedSize: 0 + - _OutlineFixedSizeAnimated: 0 + - _OutlineLit: 1 + - _OutlineLitAnimated: 0 + - _OutlineMaskAnimated: 0 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineModeAnimated: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlinePersonaDirectionAnimated: 0 + - _OutlineRimLightBlend: 0 + - _OutlineRimLightBlendAnimated: 0 + - _OutlineShadowStrength: 1 + - _OutlineShadowStrengthAnimated: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilCompareFunctionAnimated: 0 + - _OutlineStencilFailOp: 0 + - _OutlineStencilFailOpAnimated: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilPassOpAnimated: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilReadMaskAnimated: 0 + - _OutlineStencilRef: 0 + - _OutlineStencilRefAnimated: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilWriteMaskAnimated: 0 + - _OutlineStencilZFailOp: 0 + - _OutlineStencilZFailOpAnimated: 0 + - _OutlineTextureAnimated: 0 + - _OutlineTexturePanAnimated: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineTintMixAnimated: 0 + - _OutlineUseVertexColors: 0 + - _OutlineUseVertexColorsAnimated: 0 + - _PanoBlend: 0 + - _PanoBlendAnimated: 0 + - _PanoCubeMapAnimated: 0 + - _PanoCubeMapToggle: 0 + - _PanoCubeMapToggleAnimated: 0 + - _PanoEmission: 0 + - _PanoEmissionAnimated: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoInfiniteStereoToggleAnimated: 0 + - _PanoMaskAnimated: 0 + - _PanoMaskPanAnimated: 0 + - _PanoMaskUV: 0 + - _PanoMaskUVAnimated: 0 + - _PanoToggle: 0 + - _PanoToggleAnimated: 0 + - _PanosphereColorAnimated: 0 + - _PanospherePanAnimated: 0 + - _PanosphereTextureAnimated: 0 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxBiasAnimated: 0 + - _ParallaxHeightMapAnimated: 0 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapEnabledAnimated: 0 + - _ParallaxHeightMapMaskAnimated: 0 + - _ParallaxHeightMapMaskPanAnimated: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxHeightMapMaskUVAnimated: 0 + - _ParallaxHeightMapPanAnimated: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightFromAlphaAnimated: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalHeightmapModeAnimated: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalIterationsAnimated: 0 + - _ParallaxInternalMapAnimated: 0 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapEnabledAnimated: 0 + - _ParallaxInternalMapMaskAnimated: 0 + - _ParallaxInternalMapMaskPanAnimated: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMapMaskUVAnimated: 0 + - _ParallaxInternalMaxColorAnimated: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxDepthAnimated: 0 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMaxFadeAnimated: 0 + - _ParallaxInternalMinColorAnimated: 0 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinDepthAnimated: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxInternalMinFadeAnimated: 0 + - _ParallaxInternalPanDepthSpeedAnimated: 0 + - _ParallaxInternalPanSpeedAnimated: 0 + - _ParallaxMap: 0 + - _ParallaxMapAnimated: 0 + - _ParallaxStrength: 0 + - _ParallaxStrengthAnimated: 0 + - _ParallaxUV: 0 + - _ParallaxUVAnimated: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlendMultiplicativeAnimated: 0 + - _RGBBluePanningAnimated: 0 + - _RGBBlue_UV: 0 + - _RGBBlue_UVAnimated: 0 + - _RGBGreenPanningAnimated: 0 + - _RGBGreen_UV: 0 + - _RGBGreen_UVAnimated: 0 + - _RGBMaskAnimated: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskEnabledAnimated: 0 + - _RGBMaskPanningAnimated: 0 + - _RGBMaskUV: 0 + - _RGBMaskUVAnimated: 0 + - _RGBNormalBlend: 0 + - _RGBNormalBlendAnimated: 0 + - _RGBRedPanningAnimated: 0 + - _RGBRed_UV: 0 + - _RGBRed_UVAnimated: 0 + - _RGBUseVertexColors: 0 + - _RGBUseVertexColorsAnimated: 0 + - _RedColorAnimated: 0 + - _RedTexureAnimated: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionChromaticAberattionAnimated: 0 + - _RefractionEnabled: 0 + - _RefractionEnabledAnimated: 0 + - _RefractionIndex: 1.333333 + - _RefractionIndexAnimated: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimBrightenAnimated: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroBlurAnimated: 0 + - _RimEnviroIntensity: 1 + - _RimEnviroIntensityAnimated: 0 + - _RimEnviroMaskAnimated: 0 + - _RimEnviroMaskPanAnimated: 0 + - _RimEnviroMaskUV: 0 + - _RimEnviroMaskUVAnimated: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroMinBrightnessAnimated: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroSharpnessAnimated: 0 + - _RimEnviroWidth: 0.45 + - _RimEnviroWidthAnimated: 0 + - _RimLightColorAnimated: 0 + - _RimLightColorBias: 0 + - _RimLightColorBiasAnimated: 0 + - _RimLightNormal: 1 + - _RimLightNormalAnimated: 0 + - _RimLightingInvert: 0 + - _RimLightingInvertAnimated: 0 + - _RimMaskAnimated: 0 + - _RimMaskPanAnimated: 0 + - _RimMaskUV: 0 + - _RimMaskUVAnimated: 0 + - _RimSharpness: 0.25 + - _RimSharpnessAnimated: 0 + - _RimStrength: 0 + - _RimStrengthAnimated: 0 + - _RimTexAnimated: 0 + - _RimTexPanAnimated: 0 + - _RimTexUV: 0 + - _RimTexUVAnimated: 0 + - _RimWidth: 0.8 + - _RimWidthAnimated: 0 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseStrengthAnimated: 0 + - _RimWidthNoiseTextureAnimated: 0 + - _RimWidthNoiseTexturePanAnimated: 0 + - _RimWidthNoiseTextureUV: 0 + - _RimWidthNoiseTextureUVAnimated: 0 + - _SSSColorAnimated: 0 + - _SSSDistortion: 1 + - _SSSDistortionAnimated: 0 + - _SSSPower: 5 + - _SSSPowerAnimated: 0 + - _SSSSCale: 0.25 + - _SSSSCaleAnimated: 0 + - _SSSThicknessMapAnimated: 0 + - _SSSThicknessMapPanAnimated: 0 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMapUVAnimated: 0 + - _SSSThicknessMod: 0 + - _SSSThicknessModAnimated: 0 + - _SampleWorld: 0 + - _SampleWorldAnimated: 0 + - _Saturation: 0 + - _SaturationAnimated: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission1Animated: 0 + - _ScrollingEmissionAnimated: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadowMix: 0 + - _ShadowMixAnimated: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixThresholdAnimated: 0 + - _ShadowMixWidthMod: 0.5 + - _ShadowMixWidthModAnimated: 0 + - _ShadowOffset: 0 + - _ShadowOffsetAnimated: 0 + - _ShadowStrength: 1 + - _ShadowStrengthAnimated: 0 + - _Smoothness: 0 + - _SmoothnessAnimated: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessFrom1Animated: 0 + - _SmoothnessFromAnimated: 0 + - _SmoothnessMaskAnimated: 0 + - _SmoothnessMaskPanAnimated: 0 + - _SmoothnessMaskUV: 0 + - _SmoothnessMaskUVAnimated: 0 + - _SmoothnessTextureChannel: 0 + - _SourceBlend: 5 + - _SpawnInAlpha: 0 + - _SpawnInAlphaAnimated: 0 + - _SpawnInEmissionColorAnimated: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInEmissionOffsetAnimated: 0 + - _SpawnInGradientFinishAnimated: 0 + - _SpawnInGradientStartAnimated: 0 + - _SpawnInNoiseAnimated: 0 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInNoiseIntensityAnimated: 0 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetAnimated: 0 + - _SpawnInVertOffsetOffset: 0.1 + - _SpawnInVertOffsetOffsetAnimated: 0 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec1Offset1Animated: 0 + - _Spec1OffsetAnimated: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _Spec2Smoothness1Animated: 0 + - _Spec2SmoothnessAnimated: 0 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecWhatTangent1Animated: 0 + - _SpecWhatTangentAnimated: 0 + - _SpecularAnisoJitterMacro1Animated: 0 + - _SpecularAnisoJitterMacro1PanAnimated: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacro1UVAnimated: 0 + - _SpecularAnisoJitterMacroAnimated: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroMultiplier1Animated: 0 + - _SpecularAnisoJitterMacroMultiplierAnimated: 0 + - _SpecularAnisoJitterMacroPanAnimated: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMacroUVAnimated: 0 + - _SpecularAnisoJitterMicro1Animated: 0 + - _SpecularAnisoJitterMicro1PanAnimated: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicro1UVAnimated: 0 + - _SpecularAnisoJitterMicroAnimated: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroMultiplier1Animated: 0 + - _SpecularAnisoJitterMicroMultiplierAnimated: 0 + - _SpecularAnisoJitterMicroPanAnimated: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMicroUVAnimated: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularAnisoJitterMirrored1Animated: 0 + - _SpecularAnisoJitterMirroredAnimated: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularInvertSmoothness1Animated: 0 + - _SpecularInvertSmoothnessAnimated: 0 + - _SpecularMap1Animated: 0 + - _SpecularMap1PanAnimated: 0 + - _SpecularMap1UV: 0 + - _SpecularMap1UVAnimated: 0 + - _SpecularMapAnimated: 0 + - _SpecularMapPanAnimated: 0 + - _SpecularMapUV: 0 + - _SpecularMapUVAnimated: 0 + - _SpecularMask1Animated: 0 + - _SpecularMask1PanAnimated: 0 + - _SpecularMask1UV: 0 + - _SpecularMask1UVAnimated: 0 + - _SpecularMaskAnimated: 0 + - _SpecularMaskPanAnimated: 0 + - _SpecularMaskUV: 0 + - _SpecularMaskUVAnimated: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallic1Animated: 0 + - _SpecularMetallicAnimated: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularNormal1Animated: 0 + - _SpecularNormalAnimated: 0 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularSmoothness1Animated: 0 + - _SpecularSmoothnessAnimated: 0 + - _SpecularTint1Animated: 0 + - _SpecularTintAnimated: 0 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonEnd1Animated: 0 + - _SpecularToonEndAnimated: 0 + - _SpecularToonInnerOuter1Animated: 0 + - _SpecularToonInnerOuterAnimated: 0 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularToonStart1Animated: 0 + - _SpecularToonStartAnimated: 0 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SpecularType1Animated: 0 + - _SpecularTypeAnimated: 0 + - _SrcBlend: 5 + - _SrcBlendAnimated: 0 + - _StencilCompareFunction: 8 + - _StencilCompareFunctionAnimated: 0 + - _StencilFailOp: 0 + - _StencilFailOpAnimated: 0 + - _StencilPassOp: 2 + - _StencilPassOpAnimated: 0 + - _StencilReadMask: 255 + - _StencilReadMaskAnimated: 0 + - _StencilRef: 12 + - _StencilRefAnimated: 0 + - _StencilWriteMask: 255 + - _StencilWriteMaskAnimated: 0 + - _StencilZFailOp: 0 + - _StencilZFailOpAnimated: 0 + - _TextEnabled: 0 + - _TextEnabledAnimated: 0 + - _TextFPSColorAnimated: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEmissionStrengthAnimated: 0 + - _TextFPSEnabled: 0 + - _TextFPSEnabledAnimated: 0 + - _TextFPSOffsetAnimated: 0 + - _TextFPSPaddingAnimated: 0 + - _TextFPSRotation: 0 + - _TextFPSRotationAnimated: 0 + - _TextFPSScaleAnimated: 0 + - _TextFPSUV: 0 + - _TextFPSUVAnimated: 0 + - _TextGlyphsAnimated: 0 + - _TextPixelRange: 4 + - _TextPixelRangeAnimated: 0 + - _TextPositionColorAnimated: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEmissionStrengthAnimated: 0 + - _TextPositionEnabled: 0 + - _TextPositionEnabledAnimated: 0 + - _TextPositionOffsetAnimated: 0 + - _TextPositionPaddingAnimated: 0 + - _TextPositionRotation: 0 + - _TextPositionRotationAnimated: 0 + - _TextPositionScaleAnimated: 0 + - _TextPositionUV: 0 + - _TextPositionUVAnimated: 0 + - _TextTimeColorAnimated: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEmissionStrengthAnimated: 0 + - _TextTimeEnabled: 0 + - _TextTimeEnabledAnimated: 0 + - _TextTimeOffsetAnimated: 0 + - _TextTimePaddingAnimated: 0 + - _TextTimeRotation: 0 + - _TextTimeRotationAnimated: 0 + - _TextTimeScaleAnimated: 0 + - _TextTimeUV: 0 + - _TextTimeUVAnimated: 0 + - _ToonRampAnimated: 0 + - _UVSec: 0 + - _UseShadowTexture: 0 + - _UseShadowTextureAnimated: 0 + - _Use_1stAs2nd: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchFrequencyAnimated: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchStrengthAnimated: 0 + - _VertexGlitchThreshold: 1 + - _VertexGlitchThresholdAnimated: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightAnimated: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightBiasAnimated: 0 + - _VertexManipulationHeightMaskAnimated: 0 + - _VertexManipulationHeightPanAnimated: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationHeightUVAnimated: 0 + - _VertexManipulationLocalRotationAnimated: 0 + - _VertexManipulationLocalScaleAnimated: 0 + - _VertexManipulationLocalTranslationAnimated: 0 + - _VertexManipulationWorldTranslationAnimated: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingDivisionAnimated: 0 + - _VertexRoundingEnabled: 0 + - _VertexRoundingEnabledAnimated: 0 + - _VertexUnwrap: 0 + - _VertexUnwrapAnimated: 0 + - _VideoBacklight: 1 + - _VideoBacklightAnimated: 0 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTPixelEnergizedTimeAnimated: 0 + - _VideoCRTRefreshRate: 24 + - _VideoCRTRefreshRateAnimated: 0 + - _VideoContrast: 0 + - _VideoContrastAnimated: 0 + - _VideoDebugTextureAnimated: 0 + - _VideoEnableDebug: 0 + - _VideoEnableDebugAnimated: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoEnableVideoPlayerAnimated: 0 + - _VideoGameboyRampAnimated: 0 + - _VideoMaskPanningAnimated: 0 + - _VideoMaskTextureAnimated: 0 + - _VideoOffsetAnimated: 0 + - _VideoPanningAnimated: 0 + - _VideoPixelTextureAnimated: 0 + - _VideoPixelateToResolution: 0 + - _VideoPixelateToResolutionAnimated: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoRepeatVideoTextureAnimated: 0 + - _VideoResolutionAnimated: 0 + - _VideoSaturation: 0 + - _VideoSaturationAnimated: 0 + - _VideoTilingAnimated: 0 + - _VideoType: 3 + - _VideoTypeAnimated: 0 + - _VideoUVNumber: 0 + - _VideoUVNumberAnimated: 0 + - _VoronoiBlend: 0 + - _VoronoiBlendAnimated: 0 + - _VoronoiColor0Animated: 0 + - _VoronoiColor1Animated: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEffectsMaterialAlphaAnimated: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission0Animated: 0 + - _VoronoiEmission1: 0 + - _VoronoiEmission1Animated: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiEnableRandomCellColorAnimated: 0 + - _VoronoiGradientAnimated: 0 + - _VoronoiMaskAnimated: 0 + - _VoronoiMaskPanAnimated: 0 + - _VoronoiMaskUV: 0 + - _VoronoiMaskUVAnimated: 0 + - _VoronoiNoiseAnimated: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseIntensityAnimated: 0 + - _VoronoiNoisePanAnimated: 0 + - _VoronoiNoiseUV: 0 + - _VoronoiNoiseUVAnimated: 0 + - _VoronoiRandomMinMaxBrightnessAnimated: 0 + - _VoronoiRandomMinMaxSaturationAnimated: 0 + - _VoronoiScale: 5 + - _VoronoiScaleAnimated: 0 + - _VoronoiSpace: 0 + - _VoronoiSpaceAnimated: 0 + - _VoronoiSpeedAnimated: 0 + - _VoronoiType: 1 + - _VoronoiTypeAnimated: 0 + - _ZTest: 4 + - _ZTestAnimated: 0 + - _ZWrite: 0 + - _ZWriteAnimated: 0 + - _commentIfZero_EnableGrabpass: 0 + - _commentIfZero_EnableOutlinePass: 0 + - _commentIfZero_LightingAdditiveEnable: 1 + - _commentIfZero_LightingAdditiveEnableAnimated: 0 + - _glitterFrequencyLinearEmissive: 20 + - _glitterFrequencyLinearEmissiveAnimated: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_LockingInfo: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_Special_Effects: 0 + - m_StencilPassOptions: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GrabPass: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_clearCoat: 0 + - m_end_debugOptions: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emissionOptions: 0 + - m_end_flipBook: 0 + - m_end_glitter: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pointToPoint: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_shadowTexture: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_subsurface: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingOptions: 0 + - m_mainOptions: 1 + - m_outlineOptions: 0 + - m_renderingOptions: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GrabPass: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_clearCoat: 0 + - m_start_debugOptions: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emissionOptions: 0 + - m_start_flipBook: 0 + - m_start_glitter: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pointToPoint: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_shadowTexture: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_subsurface: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AlphaMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 0.21176471} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GrabPassBlendMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainDistanceFade: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainHueShiftMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat.meta new file mode 100644 index 00000000..3780a762 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/Stencil/outside.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dd5a9a3b9e3639c46bda1485d4465e63 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx new file mode 100644 index 00000000..8db6b1ab Binary files /dev/null and b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx differ diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx.meta new file mode 100644 index 00000000..9202f6b2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Examples/ring.fbx.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: 0ce0126ff0b46b6419cca2653b164af4 +ModelImporter: + serializedVersion: 19301 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader.meta new file mode 100644 index 00000000..bcc3f391 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 724a9cd6d562cf645b84be676a878cf7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc new file mode 100644 index 00000000..7d3f7179 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc @@ -0,0 +1,13 @@ +[Space(4)] +[ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + +[Vector2]_AudioLinkEmission1StrengthMod ("Emission Strength Add--{ condition_showS:(_AudioLinkEmission1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] Band ("Band--{ condition_showS:(==1 && ==1)}", Int) = 0 +[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALType ("Motion Type--{ condition_showS:(_EnableAudioLink==1 && ==1)}", Int) = 0 + +#ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + + } +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc.meta new file mode 100644 index 00000000..09fc7747 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/AudioLinkNotes.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d24acee24fc9144cbd2e12c0fac559d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor.meta new file mode 100644 index 00000000..ae3142fa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09d07bc95aa5c5e4f88d3b1d6e4529b5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules.meta new file mode 100644 index 00000000..60768450 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 725562e23e5f1ad45b625de09fd8a5bd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules.meta new file mode 100644 index 00000000..b565a97d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 386150abf0c2cc14ab663c90ebf85c95 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals.meta new file mode 100644 index 00000000..a606cafb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8b923a20e7942c48b6c8f65145c6c02 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset new file mode 100644 index 00000000..3d47282e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset @@ -0,0 +1,73 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiALDecals + m_EditorClassIdentifier: + Id: PoiALDecal + Name: PoiALDecal + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -1600654798350694673, guid: 70efb560537f5b545813faaf4d6f8428, + type: 3} + Keywords: + - AUDIOLINK_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4820396145866010957, guid: 70efb560537f5b545813faaf4d6f8428, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 522983997937746048, guid: 70efb560537f5b545813faaf4d6f8428, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1333774844789713128, guid: 70efb560537f5b545813faaf4d6f8428, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7476105749771648410, guid: 70efb560537f5b545813faaf4d6f8428, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset.meta new file mode 100644 index 00000000..e782c201 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLM_PoiALDecals.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 383407afc98e84c41ab2156f362de87c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection new file mode 100644 index 00000000..a37149b1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection @@ -0,0 +1,235 @@ +#T#PoiALDecalsProperties + +[HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 +[HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 +[HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + +[ThryHeaderLabel(Transform, 13)] +[Space(4)] +[Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 +[Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) +_ALUVScale ("Scale", Vector) = (1, 1, 1, 1) +_ALUVRotation ("Rotation", Range(0, 360)) = 0 +_ALUVRotationSpeed ("Rotation Speed", Float) = 0 +_ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 +_ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + +[Space][ThryHeaderLabel(Volume, 13)] +[Space(4)] +_ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 +_ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 +_ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + +[Space][ThryHeaderLabel(Band, 13)] +[Space(4)] +_ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 +_ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 +_ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + + +[Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 +_ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 +_ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + +[Space][ThryHeaderLabel(Audio Mods, 13)] +[Space(4)] +_ALDecalVolume ("Volume", Int) = 0.5 +_ALDecalBaseBoost ("Bass Boost", Float) = 5.0 +_ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + +[Space][ThryHeaderLabel(Colors and Blending, 13)] +[Space(4)] +[Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 +_ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) +_ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 +_ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) +_ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 +_ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) +_ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 +[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 +_ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 +_ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + + +[HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + +#T#PoiALDecalsKeywords +#pragma shader_feature_local POI_AL_DECAL + +#T#PoiALDecalsVariables +#ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif +#endif +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiALDecalsFunctions + +/* +Liltoon made most of this and it looked really good so I modified it to be a little more poi + +MIT License + +Copyright (c) 2020-2021 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. +*/ + +#ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif +#endif + +#T#PoiALDecalsFunctionCalls +#ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection.meta new file mode 100644 index 00000000..0caf4e7f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/AL_Modules/Poi_ALDecals/VRLT_PoiALDecals.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 70efb560537f5b545813faaf4d6f8428 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc new file mode 100644 index 00000000..e6d724f8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc @@ -0,0 +1,35 @@ +#ifndef EMISSFUNCS_DEFINED +#define EMISSFUNCS_DEFINED +float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) +{ + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; +} + +float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) +{ + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.x + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; +} + +float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) +{ + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.x + offset) * blinkVelocity) * amplitude + base; +} +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc.meta new file mode 100644 index 00000000..56f0fa38 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/EmissFuncs.cginc.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dae983df242ef7e47b43eb5361c3b3dc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess.meta new file mode 100644 index 00000000..f38e0919 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 076f01bd8fd89a246bf35d58b37b8607 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset new file mode 100644 index 00000000..3cdc8fec --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset @@ -0,0 +1,60 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_MochiePostProcess + m_EditorClassIdentifier: + Id: MochiePostProcessing + Name: Mochie Poist Processing + Version: + Author: Mochiev + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 8014626605520266589, guid: bd2646f9a5e11fd41b9152ad525a8737, + type: 3} + Keywords: + - POSTPROCESSING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4712880270246504427, guid: bd2646f9a5e11fd41b9152ad525a8737, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5439719861871570770, guid: bd2646f9a5e11fd41b9152ad525a8737, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6583141509379797354, guid: bd2646f9a5e11fd41b9152ad525a8737, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -3681194354718786754, guid: bd2646f9a5e11fd41b9152ad525a8737, + type: 3} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset.meta new file mode 100644 index 00000000..f004a05c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLM_MochiePostProcess.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9474e8294d5143c41943a89f4bda71fd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection new file mode 100644 index 00000000..3e80c115 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection @@ -0,0 +1,127 @@ +#T#MochiePostProcessProperties + +[HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 +[HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 +[ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + +[NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} +_PPLUTStrength("LUT Strength", Range(0,1)) = 0 +_PPHue("Hue", Range(0,1)) = 0 +[HDR]_PPTint("Tint", Color) = (1,1,1,1) +[Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) +_PPContrast("Contrast", Float) = 1 +_PPSaturation("Saturation", Float) = 1 +_PPBrightness("Brightness", Float) = 1 +_PPLightness("Lightness", Float) = 0 +_PPHDR("HDR", Float) = 0 + +[HideInInspector] m_end_postprocess ("", Float) = 0 + +#T#MochiePostProcessKeywords +#pragma shader_feature_local MOCHIE_POSTPROCESS + +#T#MochiePostProcessVariables +#ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + +#endif + + +#T#MochiePostProcessFunctions +#ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } +#endif + +#T#MochiePostProcessFunctionCalls +#ifdef MOCHIE_POSTPROCESS + applyPostProcessing(poiFragData, poiMesh); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection.meta new file mode 100644 index 00000000..19624aa0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Mochie_PostProcess/VRLT_MochiePostProcess.poiTemplatecollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bd2646f9a5e11fd41b9152ad525a8737 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions.meta new file mode 100644 index 00000000..36b93b4c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bab7340c9152ab34683a0d5100887f14 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset new file mode 100644 index 00000000..8dd44fcd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset @@ -0,0 +1,98 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_AlphaOptions + m_EditorClassIdentifier: + Id: PoiAlphaOptions + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 257055857157848321, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7896923665127700555, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7842061715366162960, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6382579130851865620, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7046177447067330403, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -9026782082732213869, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4379745813462220173, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4466012173581799560, guid: 6c6bcf2ea34623741a36552a6c678ea3, + type: 3} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset.meta new file mode 100644 index 00000000..832fca7d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLM_AlphaOptions.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 691861f6a28e64048b4d465b44e7dae2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection new file mode 100644 index 00000000..1c72a040 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection @@ -0,0 +1,208 @@ +#T#PoiAlphaOptionsProperties +[HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 +[ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 +_AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 +[ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + + +[Space(4)] +[ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 +[ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 +_AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + +[Space(4)] +[ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 +_AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + +[Space(4)] +[ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 +[Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 +_AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 +_AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 +_AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 +_AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + +[Space(4)] +[ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 +_AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 +_AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 +_AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 +[ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + +[Space(4)] +[ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 +[Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 +[Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 +[Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) +_CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 +_CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 +_ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 +_ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 +_AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + +[Space(4)] +[ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 +[Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 +[HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + +#T#PoiAlphaOptionsKeywords +//#pragma shader_feature KEYWORD + +#T#PoiAlphaOptionsVariables +float _AlphaForceOpaque; +float _AlphaMod; +float _AlphaPremultiply; + +float _AlphaToCoverage; +float _AlphasharpenedA2C; +float _AlphaMipScale; + +float _AlphaDithering; +float _AlphaDitherGradient; + +float _AlphaDistanceFade; +float _AlphaDistanceFadeType; +float _AlphaDistanceFadeMinAlpha; +float _AlphaDistanceFadeMaxAlpha; +float _AlphaDistanceFadeMin; +float _AlphaDistanceFadeMax; + +float _AlphaFresnel; +float _AlphaFresnelAlpha; +float _AlphaFresnelSharpness; +float _AlphaFresnelWidth; +float _AlphaFresnelInvert; + +float _AlphaAngular; +float _AngleType; +float _AngleCompareTo; +float3 _AngleForwardDirection; +float _CameraAngleMin; +float _CameraAngleMax; +float _ModelAngleMin; +float _ModelAngleMax; +float _AngleMinAlpha; + +float _AlphaAudioLinkEnabled; +float2 _AlphaAudioLinkAddRange; +float _AlphaAudioLinkAddBand; +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiAlphaOptionsFunctions +void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) +{ + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif +} + +inline half Dither8x8Bayer(int x, int y) +{ + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; +} + +half calcDither(half2 grabPos) +{ + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; +} + +void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) +{ + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } +} + +void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) +{ + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } +} + +#T#PoiAlphaOptionsFunctionCall +applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + +#T#PoiAlphaOptionsDitherFunctionCall +applyDithering(poiFragData, poiCam); + +#T#PoiAlphaOptionsForceOpaque +poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha; + +#T#PoiAlphaToCoverageFunctionCall +ApplyAlphaToCoverage(poiFragData, poiMesh); \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection.meta new file mode 100644 index 00000000..bc966199 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AlphaOptions/VRLT_PoiAlphaOptions.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6c6bcf2ea34623741a36552a6c678ea3 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink.meta new file mode 100644 index 00000000..27c6db94 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9f465b1b014823343854e4bf41297fdf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset new file mode 100644 index 00000000..e8c80279 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiAudioLink + m_EditorClassIdentifier: + Id: PoiAudioLink + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -7419410332106174641, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - EXTRAS_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4077475223260929287, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4910312744796953162, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - MACROS_AND_DEFINES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4096923687103298880, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8714289124560104235, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - VERTEX_BASE_FUNCTIONS_EARLY + - VERTEX_ADD_FUNCTIONS_EARLY + - VERTEX_SHADOW_FUNCTIONS_EARLY + - VERTEX_META_FUNCTIONS_EARLY + - VERTEX_OUTLINE_FUNCTIONS_EARLY + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2835084315498978105, guid: 1be7b43adb0e07543b4687f3e0f50e1f, + type: 3} + Keywords: + - FRAGMENT_BASE_INIT + - FRAGMENT_ADD_INIT + - FRAGMENT_SHADOW_INIT + - FRAGMENT_META_INIT + - FRAGMENT_OUTLINE_INIT + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset.meta new file mode 100644 index 00000000..336c4535 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLM_PoiAudioLink.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 87ca4a92adfc6d24f8f9bef432acf14a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection new file mode 100644 index 00000000..d63bf6e7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection @@ -0,0 +1,390 @@ +#T#PoiAudioLinkProperties +// Audio link +[HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 +[HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 +[HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 +[Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 +[ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 +/* +_AudioLinkDelay ("Delay", Range(0, 1)) = 0 +[ToggleUI]_AudioLinkCCStripY("CC Strip Y UV", Float) = 0 +*/ +//[ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 +//_AudioLinkAverageRange ("Average Sampling Range", Range(0, 1)) = .5 +[ThryHeaderLabel(Debug Visualizer, 13)] +[ToggleUI]_DebugWaveform("Waveform", Float) = 0 +[ToggleUI]_DebugDFT("DFT", Float) = 0 +[ToggleUI]_DebugBass("Bass", Float) = 0 +[ToggleUI]_DebugLowMids("Low Mids", Float) = 0 +[ToggleUI]_DebugHighMids("High Mids", Float) = 0 +[ToggleUI]_DebugTreble("Treble", Float) = 0 +[ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 +[ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 +[ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 +[ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 +[ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 +[Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + +[HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + +#K#AUDIOLINK_PROPERTIES + +#T#PoiAudioLinkKeywords +#pragma shader_feature COLOR_GRADING_LOG_VIEW + +#T#PoiAudioLinkMacrosAndDefines +// Map of where features in AudioLink are. +#define ALPASS_DFT uint2(0,4) //Size: 128, 2 +#define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 +#define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 +#define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 +#define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 +#define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 +#define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 +#define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 +#define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 +#define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 +#define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 +#define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 +#define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 +#define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 +#define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) +#define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) +#define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) +#define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) +// Added in version 2.5 +#define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 +// Added in version 2.6 +#define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 +#define ALPASS_THEME_COLOR0 uint2(0,23) +#define ALPASS_THEME_COLOR1 uint2(1,23) +#define ALPASS_THEME_COLOR2 uint2(2,23) +#define ALPASS_THEME_COLOR3 uint2(3,23) +#define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 +#define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 +#define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + +// Some basic constants to use (Note, these should be compatible with +// future version of AudioLink, but may change. +#define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. +#define AUDIOLINK_SAMPLEDATA24 2046 +#define AUDIOLINK_EXPBINS 24 +#define AUDIOLINK_EXPOCT 10 +#define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) +#define AUDIOLINK_WIDTH 128 +#define AUDIOLINK_SPS 48000 // Samples per second +#define AUDIOLINK_ROOTNOTE 0 +#define AUDIOLINK_4BAND_FREQFLOOR 0.123 +#define AUDIOLINK_4BAND_FREQCEILING 1 +#define AUDIOLINK_BOTTOM_FREQUENCY 13.75 +#define AUDIOLINK_BASE_AMPLITUDE 2.5 +#define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 +#define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 +#define AUDIOLINK_DFT_Q 4.0 +#define AUDIOLINK_TREBLE_CORRECTION 5.0 + +// ColorChord constants +#define COLORCHORD_EMAXBIN 192 +#define COLORCHORD_IIR_DECAY_1 0.90 +#define COLORCHORD_IIR_DECAY_2 0.85 +#define COLORCHORD_CONSTANT_DECAY_1 0.01 +#define COLORCHORD_CONSTANT_DECAY_2 0.0 +#define COLORCHORD_NOTE_CLOSEST 3.0 +#define COLORCHORD_NEW_NOTE_GAIN 8.0 +#define COLORCHORD_MAX_NOTES 10 + +// We use glsl_mod for most calculations because it behaves better +// on negative numbers, and in some situations actually outperforms +// HLSL's modf(). +#ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) +#endif + +uniform float4 _AudioTexture_TexelSize; + +#ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING +#endif + +// Mechanism to index into texture. +#ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) +#else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] +#endif + +#T#PoiAudioLinkVariables +#ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; +#endif + +#T#PoiAudioLinkFunctions +#ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + +/* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); +*/ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + +#endif + +#T#PoiAudioLinkFunctionCalls +#ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection.meta new file mode 100644 index 00000000..e56c034b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_AudioLink/VRLT_PoiAudioLink.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1be7b43adb0e07543b4687f3e0f50e1f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace.meta new file mode 100644 index 00000000..a04ba6f3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a620568a49f87349b7478e5fdb6f02d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset new file mode 100644 index 00000000..3917efde --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiBackface + m_EditorClassIdentifier: + Id: PoiBackFace + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -3101754527048639204, guid: 837549448592a3a4ea33a7aa0e689f00, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6702876446688562091, guid: 837549448592a3a4ea33a7aa0e689f00, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 9198516683745240821, guid: 837549448592a3a4ea33a7aa0e689f00, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3739020101595156813, guid: 837549448592a3a4ea33a7aa0e689f00, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2703058238815093264, guid: 837549448592a3a4ea33a7aa0e689f00, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset.meta new file mode 100644 index 00000000..e1fcb5de --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLM_PoiBackface.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1e5f5acfca7186c42ad0956d45397b4f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection new file mode 100644 index 00000000..656c30ca --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection @@ -0,0 +1,94 @@ +#T#PoiBackFaceProperties +// Back Face Textures and Emission +[HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 +[HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 +_BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 +_BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_BackFaceAlpha ("Alpha", Range(0,1)) = 1 +_BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 +_BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 +_BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 +[ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 +[Space(10)] +[ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 +_BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 +_BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 +[HideInInspector] m_end_backFace ("Back Face", Float) = 0 + +#T#PoiBackFaceKeywords +#pragma shader_feature_local POI_BACKFACE + +#T#PoiBackFaceVariables +#ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; +#endif + +//TODO detail strength stuff + +#T#PoiBackFaceFunction +#ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } +#endif + +#T#PoiBackFaceFunctionCall +#ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection.meta new file mode 100644 index 00000000..bf4f4eb3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BackFace/VRLT_PoiBackface.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 837549448592a3a4ea33a7aa0e689f00 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil.meta new file mode 100644 index 00000000..a7c49650 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 752113ac546a43147a017314c171ce98 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset new file mode 100644 index 00000000..71147f21 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset @@ -0,0 +1,47 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiStencil + m_EditorClassIdentifier: + Id: PoiStencil + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 3419128985690004776, guid: 32ded4667257b3f4e93d2d3058e89155, + type: 3} + Keywords: + - RENDERING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7180907857290092215, guid: 32ded4667257b3f4e93d2d3058e89155, + type: 3} + Keywords: + - BASE_PASS_STENCIL + - ADD_PASS_STENCIL + - SHADOW_PASS_STENCIL + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset.meta new file mode 100644 index 00000000..e70c9162 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLM_PoiStencil.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2bc9a6f3110c97941a79c0f76a712bae +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection new file mode 100644 index 00000000..9334d018 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection @@ -0,0 +1,23 @@ +#T#PoiStencilProperties +// Stencils +[HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 +[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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 +[Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 +[Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 +[Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 +[HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + +#T#PoiStencilImplementation +Stencil +{ + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection.meta new file mode 100644 index 00000000..8c621780 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_BasicStencil/VRLTC_PoiStencil.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 32ded4667257b3f4e93d2d3058e89155 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat.meta new file mode 100644 index 00000000..c460c01e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b3d3bdf040120c429734ded5a9de9f3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset new file mode 100644 index 00000000..0a6c8f46 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiClearCoat + m_EditorClassIdentifier: + Id: PoiClearCoat + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 3475108424563487324, guid: 80d2c7d71ce42fd4084539047554d960, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 132802937689863038, guid: 80d2c7d71ce42fd4084539047554d960, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2962063347185509527, guid: 80d2c7d71ce42fd4084539047554d960, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3052803606827435561, guid: 80d2c7d71ce42fd4084539047554d960, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6082946387840839033, guid: 80d2c7d71ce42fd4084539047554d960, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_META_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset.meta new file mode 100644 index 00000000..54a08aff --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLM_PoiClearCoat.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc41f153d2e0ddd499b073cb3759a161 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection new file mode 100644 index 00000000..daee0dea --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection @@ -0,0 +1,149 @@ +#T#PoiClearCoatProperties + +[HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 +[HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 +_ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } +[HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + +_ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + +[NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + +[ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + +_ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 +_ClearCoat ("Clear Coat", Range(0, 1)) = 1 +_ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 +[ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 +[ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 +[HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + +#T#PoiClearCoatKeywords +#pragma shader_feature_local _COLORCOLOR_ON + +#T#PoiClearCoatVariables +#ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; +#endif + +#T#PoiClearCoatFunctions +#ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } +#endif + +#T#PoiClearCoatFunctionCalls +#ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection.meta new file mode 100644 index 00000000..4cb6494a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_ClearCoat/VRLT_PoiClearCoat.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 80d2c7d71ce42fd4084539047554d960 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap.meta new file mode 100644 index 00000000..19a9f37c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0253f1491e1552f4294b5568dcc60f55 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset new file mode 100644 index 00000000..2850285a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiCubemap + m_EditorClassIdentifier: + Id: PoiCubemap + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 5709453681845802839, guid: b0bbd699c8ad8404c8f0032be7670867, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7135968679813074166, guid: b0bbd699c8ad8404c8f0032be7670867, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 170900233396724283, guid: b0bbd699c8ad8404c8f0032be7670867, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6936511827229705383, guid: b0bbd699c8ad8404c8f0032be7670867, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8866829741740583284, guid: b0bbd699c8ad8404c8f0032be7670867, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset.meta new file mode 100644 index 00000000..6b815e74 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLM_PoiCubemap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b7107bd37b2093f499c145a305820813 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection new file mode 100644 index 00000000..49dd317a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection @@ -0,0 +1,125 @@ +#T#PoiCubeMapProperties +// First CubeMap +[HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 +[HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 +[ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 +_CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 +[TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } +_CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 +_CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 +_CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 +_CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 +_CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 +_CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 +[Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + +[Space(10)] +[ThryHeaderLabel(Hue Shift, 13)] +[Space(4)] +[ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 +_CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 +_CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 +[HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + +#T#PoiCubeMap_Keyword +#pragma shader_feature_local _CUBEMAP + +#T#PoiCubeMapVariables +#ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiCubeMapFunctions +#ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } +#endif + +#T#PoiCubeMapFunctionCalls +#ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection.meta new file mode 100644 index 00000000..8d23fe3a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Cubemap/VRLT_PoiCubemap.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b0bbd699c8ad8404c8f0032be7670867 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals.meta new file mode 100644 index 00000000..d68ec6b9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a5fcd4211f01434aa9d2fafb4595d03 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset new file mode 100644 index 00000000..ffd65caf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiDecals + m_EditorClassIdentifier: + Id: PoiDecals + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 8428600710535791143, guid: 41f9db446eef137408ffc08139ce8d01, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5811997720698039619, guid: 41f9db446eef137408ffc08139ce8d01, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -9183495692868678764, guid: 41f9db446eef137408ffc08139ce8d01, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5444516229790824447, guid: 41f9db446eef137408ffc08139ce8d01, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1670893242210294853, guid: 41f9db446eef137408ffc08139ce8d01, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset.meta new file mode 100644 index 00000000..efe3f5e9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLM_PoiDecals.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15d0dbfc16740a6458f40abedce1e247 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection new file mode 100644 index 00000000..3caccfb3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection @@ -0,0 +1,582 @@ +#T#PoiDecalsProperties + +// Decal Texture +[HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 +[RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 +// Decal 0 +[HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 +[HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 +[Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 +_DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 +_DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 +[ToggleUI]_DecalTiled ("Tiled?", Float) = 0 +_Decal0Depth ("Depth", Float) = 0 +[Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) +_DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) +[Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) +_DecalRotation ("Rotation", Range(0, 360)) = 0 +_DecalRotationSpeed ("Rotation Speed", Float) = 0 +[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 +_DecalBlendAlpha ("Alpha", Range(0,1)) = 1 +[ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 +[ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 +_DecalHueShiftSpeed ("Shift Speed", Float) = 0 +_DecalHueShift ("Hue Shift", Range(0,1)) = 0 +_Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 +// Decal 0 Audio Link +[HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 +_AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 +[Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 +[Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 +[Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) +[HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 +[HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 +// Decal 1 +//"GEOM_TYPE_FROND" +//"DEPTH_OF_FIELD_COC_VIEW" +[HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 +[HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 +[Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 +_DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 +_DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 +_DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 +[ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 +_Decal1Depth ("Depth", Float) = 0 +[Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) +_DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) +[Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) +_DecalRotation1 ("Rotation", Range(0, 360)) = 0 +_DecalRotationSpeed1 ("Rotation Speed", Float) = 0 +[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 +_DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 +[ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 +[ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 +_DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 +_DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 +_Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 +// Decal 1 Audio Link +[HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 +_AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 +[Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 +[Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 +[Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) +[HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 +[HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 +// Decal 2 +[HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 +[HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 +[Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 +_DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 +_DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 +_DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 +[ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 +_Decal2Depth ("Depth", Float) = 0 +[Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) +_DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) +[Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) +_DecalRotation2 ("Rotation", Range(0, 360)) = 0 +_DecalRotationSpeed2 ("Rotation Speed", Float) = 0 +[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 +_DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 +[ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 +[ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 +_DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 +_DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 +_Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 +// Decal 2 Audio Link +[HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 +_AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 +[Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 +[Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 +[Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) +[HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 +[HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 +// Decal 3 +[HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 +[HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 +[Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 +_DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 +_DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 +_DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 +[ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 +_Decal3Depth ("Depth", Float) = 0 +[Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) +_DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) +[Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) +_DecalRotation3 ("Rotation", Range(0, 360)) = 0 +_DecalRotationSpeed3 ("Rotation Speed", Float) = 0 +[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 +_DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 +[ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 +[ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 +_DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 +_DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 +_Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 +// Decal 3 Audio Link +[HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 +_AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 +_AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) +_AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 +[Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 +[Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 +[Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) +[ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 +[HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 +[HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 +[HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + +#T#PoiDecalsKeywords +#pragma shader_feature GEOM_TYPE_BRANCH +#pragma shader_feature GEOM_TYPE_BRANCH_DETAIL +#pragma shader_feature GEOM_TYPE_FROND +#pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + +#T#PoiDecalsVariables +Texture2D _DecalMask; +float4 _DecalMask_ST; +float2 _DecalMaskPan; +float _DecalMaskUV; + + +#ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; +#endif + +#ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; +#endif + +#ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; +#endif + +#ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; +#endif + +#ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiDecalsFunctions +#ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } +#endif + +#T#PoiDecalsFunctionCalls +#ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection.meta new file mode 100644 index 00000000..25ae0cb1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Decals/VRLT_PoiDecals.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 41f9db446eef137408ffc08139ce8d01 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX.meta new file mode 100644 index 00000000..7a94b409 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c051b86da044db7459ce33ff82cbc875 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset new file mode 100644 index 00000000..c64bf775 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiDepthFX + m_EditorClassIdentifier: + Id: PoiTouchFX + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -7772069551757908154, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2728699451086678995, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -3504185731099954628, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1354598148198089868, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6827594594127180737, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4458247281684517588, guid: 416990b27a9487d40a62123ecca5a2f1, + type: 3} + Keywords: + - FRAGMENT_SHADOW_FIRSTLINE + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset.meta new file mode 100644 index 00000000..2d7cf1b4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLM_PoiDepthFX.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5fe86ecf8c4b374fa356e6fa5b843f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection new file mode 100644 index 00000000..45022b54 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection @@ -0,0 +1,167 @@ +#T#PoiDepthProperties +[HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 +[HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 +_DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + +[Space(10)] +[ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 +[ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 +_DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } +[HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 +_DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 +_DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 +_DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 +_DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 +_DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + + +[Space(10)] +[ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 +_DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 +_DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 +_DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 +_DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 +[HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + +#T#PoiDepthKeyword +#pragma shader_feature GRAIN + +#T#PoiDepthVariables +#ifdef GRAIN + sampler2D _CameraDepthTexture; +#endif + +#if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; +#endif +float4 _DepthMask_ST; +float2 _DepthMaskPan; +float _DepthMaskUV; + +// Color +float _DepthColorToggle; +float _DepthColorBlendMode; +#if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; +#endif +float4 _DepthTexture_ST; +float2 _DepthTexturePan; +float _DepthTextureUV; + +float3 _DepthColor; +float _DepthColorThemeIndex; +float _DepthColorMinDepth; +float _DepthColorMaxDepth; +float _DepthColorMinValue; +float _DepthColorMaxValue; +float _DepthEmissionStrength; + +// Emission + +// Alpha +float _DepthAlphaToggle; +float _DepthAlphaMinValue; +float _DepthAlphaMaxValue; +float _DepthAlphaMinDepth; +float _DepthAlphaMaxDepth; + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiDepthFunctions +#ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } +#endif + + +#T#PoiDepthFunctionCalls +#ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); +#endif + +#T#PoiDepthKillShadow +#ifdef GRAIN + clip(-1); + return 0; +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection.meta new file mode 100644 index 00000000..0400993b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_DepthFX/VRLT_PoiDepthFX.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 416990b27a9487d40a62123ecca5a2f1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details.meta new file mode 100644 index 00000000..ac488f26 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57f44891bedc5af49b46d4b86840becf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset new file mode 100644 index 00000000..7253d8ac --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiDetails + m_EditorClassIdentifier: + Id: PoiDetails + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 5616971452501754998, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2394097962027658569, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -178965688862389078, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3951316788365445738, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1270390212882780899, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2471201819135546058, guid: 946ef45876aa6da48a28c2c0ae6ea98c, + type: 3} + Keywords: + - TANGENT_NORMAL_INJECTION + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset.meta new file mode 100644 index 00000000..7bfc8061 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLM_PoiDetails.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 026aae78de33b444185dc631aad07608 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection new file mode 100644 index 00000000..d5b5956c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection @@ -0,0 +1,95 @@ +#T#PoiDetailsProperties +[HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 +[HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 +_DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 +_DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 +_DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } +[HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 +_DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 +_DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 +[Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } +[HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 +[HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 +[HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + +#T#PoiDetailsKeywords +#pragma shader_feature FINALPASS + +#T#PoiDetailsVariables +#ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; +#endif + +#T#PoiDetailsFunctions +#ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } +#endif + +#T#PoiDetailColorFunctionCall +#ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); +#endif + +#T#PoiDetailNormalFunctionCall +#if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection.meta new file mode 100644 index 00000000..76b92b27 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Details/VRLT_PoiDetails.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 946ef45876aa6da48a28c2c0ae6ea98c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve.meta new file mode 100644 index 00000000..c1ea1059 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f20f141c3d078f43808b90938b5df52 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset new file mode 100644 index 00000000..9d10ae61 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiDissolve + m_EditorClassIdentifier: + Id: PoiDissolve + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 6190473947177011631, guid: db6fb035c5b46e941b0b8ad192fa9aef, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5769407299779581660, guid: db6fb035c5b46e941b0b8ad192fa9aef, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6485966747919507968, guid: db6fb035c5b46e941b0b8ad192fa9aef, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1196677453625105798, guid: db6fb035c5b46e941b0b8ad192fa9aef, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5874299761129568229, guid: db6fb035c5b46e941b0b8ad192fa9aef, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset.meta new file mode 100644 index 00000000..23c5c33b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLM_PoiDissolve.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7c64362992ed75347a83d003eed92e0f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection new file mode 100644 index 00000000..fe5075aa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection @@ -0,0 +1,352 @@ +#T#PoiDissolveProperties +// Dissolve +[HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 +[HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 +[Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 +_DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 +_DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 +_DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 +[Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } +_DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 +_DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 +_DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 +_DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 +_DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 +_DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } +[HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 +_DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 +_DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 +_DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 +[ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 +[HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 +_ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + +[Space(10)] +[ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + +// Point to Point Dissolve +[HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 +[Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 +_DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 +[Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) +[Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) +[HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + +[HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 +[HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 +_DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 +_DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 +[ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 +_DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 +_DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 +[HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + +// Locked in anim sldiers +[HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 +_DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 +_DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 +_DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 +_DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 +_DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 +_DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 +_DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 +_DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 +_DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 +_DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 +[HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 +[HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + +#T#PoiDissolveKeywords +#pragma shader_feature DISTORT + +#T#PoiDissolveVariables +#ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link +#ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; +#endif +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiDissolveFunctions +#ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } +#endif + +#T#PoiDissolveFunctionCalls +#ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection.meta new file mode 100644 index 00000000..d8ee8e1a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Dissolve/VRLT_PoiDissolve.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: db6fb035c5b46e941b0b8ad192fa9aef +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission.meta new file mode 100644 index 00000000..d24dfa72 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efd625d0a50786e49ad4a89008778877 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset new file mode 100644 index 00000000..b5d07b2d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiEmission + m_EditorClassIdentifier: + Id: PoiEmission0 + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 4633628742237707381, guid: e886f03f2c324ad42a9a8bea4c883146, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2098697834357393301, guid: e886f03f2c324ad42a9a8bea4c883146, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1752193264802858942, guid: e886f03f2c324ad42a9a8bea4c883146, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1515435547313068798, guid: e886f03f2c324ad42a9a8bea4c883146, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2563234616383982032, guid: e886f03f2c324ad42a9a8bea4c883146, + type: 3} + Keywords: + - FRAGMENT_BASE_EMISSION + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset.meta new file mode 100644 index 00000000..b41b6def --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLM_PoiEmission.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13aeab2df0d8ca648a80161f45bd33e7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection new file mode 100644 index 00000000..80f033fe --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection @@ -0,0 +1,907 @@ +#T#Emission0Properties +//TODO Add inverts to the masks +//Emission 1 +[HideInInspector] m_start_emissions ("Emissions", Float) = 0 +[HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 +[HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 +[ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 +[HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 +[Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 +[ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 +_EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 +_EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + +[Space(10)] +[ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 +_EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 +_EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + +// Center out emission +[Space(10)] +[ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 +_EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + +// Glow in the dark Emission +[Space(10)] +[ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 +[Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 +_GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 +_GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 +_GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 +_GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + +// Blinking Emission +[Space(10)] +[ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 +_EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 +_EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 +_EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 +_EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + +// Scrolling Emission +[Space(10)] +[ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 +[ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 +[Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } +[ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 +_EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) +_EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 +_EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 +_EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 +_EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + +[Space(10)] +[ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +_AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 +_AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[HideInInspector] m_end_emissionOptions ("", Float) = 0 + +// Second Emission +[HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 +[HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 +[ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 +[HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 +[Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 +[ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 +_EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 +_EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + +[Space(10)] +[ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 +_EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 +_EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + +// Second Center Out Enission +[Space(10)] +[ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 +_EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + +// Second Glow In The Dark Emission +[Space(10)] +[ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 +[Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 +_GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 +_GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 +_GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 +_GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + +// Second Blinking Emission +[Space(10)] +[ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 +_EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 +_EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 +_EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 +_EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + +// Second Scrolling Emission +[Space(10)] +[ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 +[ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 +[Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } +[ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 +_EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) +_EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 +_EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 +_EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 +_EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + +[Space(10)] +[ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +_AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 +_AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[HideInInspector] m_end_emission1Options ("", Float) = 0 + +// Third Emission +[HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 +[HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 +[ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 +[HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 +[Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 +[ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 +_EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 +_EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + +[Space(10)] +[ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 +_EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 +_EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + +// Third Center Out Enission +[Space(10)] +[ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 +_EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + +// Third Glow In The Dark Emission +[Space(10)] +[ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 +[Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 +_GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 +_GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 +_GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 +_GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + +// Third Blinking Emission +[Space(10)] +[ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 +_EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 +_EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 +_EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 +_EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + +// Third Scrolling Emission +[Space(10)] +[ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 +[ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 +[Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } +[ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 +_EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) +_EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 +_EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 +_EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + +[Space(10)] +[ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +_AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 +_AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[HideInInspector] m_end_emission2Options ("", Float) = 0 + +// Fourth Emission +[HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 +[HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 +[ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 +[HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 +[Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 +[ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 +_EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } +[HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 +_EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + +[Space(10)] +[ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 +_EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 +_EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + +// Fourth Center Out Enission +[Space(10)] +[ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 +_EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + +// Fourth Glow In The Dark Emission +[Space(10)] +[ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 +[Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 +_GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 +_GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 +_GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 +_GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + +// Fourth Blinking Emission +[Space(10)] +[ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 +_EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 +_EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 +_EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 +_EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + +// Fourth Scrolling Emission +[Space(10)] +[ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 +[ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 +[Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } +[ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 +_EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) +_EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 +_EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 +_EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + +[Space(10)] +[ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) +_AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 +_AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 +[HideInInspector] m_end_emission3Options ("", Float) = 0 +[HideInInspector] m_end_emissions ("Emissions", Float) = 0 + +#T#Emission0Keywords +#pragma shader_feature _EMISSION +#pragma shader_feature_local POI_EMISSION_1 +#pragma shader_feature_local POI_EMISSION_2 +#pragma shader_feature_local POI_EMISSION_3 + +#T#Emission0Variables +#ifdef _EMISSION + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap; + #endif + float4 _EmissionMap_ST; + float2 _EmissionMapPan; + float _EmissionMapUV; + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask; + #endif + float4 _EmissionMask_ST; + float2 _EmissionMaskPan; + float _EmissionMaskUV; + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve; + #endif + float4 _EmissionScrollingCurve_ST; + + float4 _EmissionColor; + float _EmissionBaseColorAsMap; + float _EmissionStrength; + float _EmissionHueShiftEnabled; + float _EmissionHueShift; + float _EmissionHueShiftSpeed; + float _EmissionCenterOutEnabled; + float _EmissionCenterOutSpeed; + float _EnableGITDEmission; + float _GITDEWorldOrMesh; + float _GITDEMinEmissionMultiplier; + float _GITDEMaxEmissionMultiplier; + float _GITDEMinLight; + float _GITDEMaxLight; + float _EmissionBlinkingEnabled; + float _EmissiveBlink_Min; + float _EmissiveBlink_Max; + float _EmissiveBlink_Velocity; + float _EmissionBlinkingOffset; + float _ScrollingEmission; + float4 _EmissiveScroll_Direction; + float _EmissiveScroll_Width; + float _EmissiveScroll_Velocity; + float _EmissiveScroll_Interval; + float _EmissionScrollingOffset; + + float _EmissionReplace0; + float _EmissionScrollingVertexColor; + float _EmissionScrollingUseCurve; + float _EmissionColorThemeIndex; + + // Audio Link + float _EmissionAL0Enabled; + float2 _EmissionAL0StrengthMod; + float _EmissionAL0StrengthBand; + float2 _AudioLinkEmission0CenterOut; + float _AudioLinkEmission0CenterOutwidth; + float _AudioLinkEmission0CenterOutSize; + float _AudioLinkEmission0CenterOutBand; +#endif + +#ifdef POI_EMISSION_1 + + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap1; + #endif + float4 _EmissionMap1_ST; + float2 _EmissionMap1Pan; + float _EmissionMap1UV; + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask1; + #endif + float4 _EmissionMask1_ST; + float2 _EmissionMask1Pan; + float _EmissionMask1UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve1; + #endif + float4 _EmissionScrollingCurve1_ST; + + float4 _EmissionColor1; + float _EmissionBaseColorAsMap1; + float _EmissionStrength1; + float _EnableEmission1; + float _EmissionHueShift1; + float _EmissionHueShiftSpeed1; + float4 _EmissiveScroll_Direction1; + float _EmissiveScroll_Width1; + float _EmissiveScroll_Velocity1; + float _EmissiveScroll_Interval1; + float _EmissionBlinkingEnabled1; + float _EmissiveBlink_Min1; + float _EmissiveBlink_Max1; + float _EmissiveBlink_Velocity1; + float _ScrollingEmission1; + float _EnableGITDEmission1; + float _GITDEMinEmissionMultiplier1; + float _GITDEMaxEmissionMultiplier1; + float _GITDEMinLight1; + float _GITDEMaxLight1; + float _GITDEWorldOrMesh1; + float _EmissionCenterOutEnabled1; + float _EmissionCenterOutSpeed1; + float _EmissionHueShiftEnabled1; + float _EmissionBlinkingOffset1; + float _EmissionScrollingOffset1; + float _EmissionScrollingVertexColor1; + float _EmissionScrollingUseCurve1; + float _EmissionReplace1; + float _EmissionColor1ThemeIndex; + + // Audio Link + float _EmissionAL1Enabled; + float2 _EmissionAL1StrengthMod; + float _EmissionAL1StrengthBand; + float2 _AudioLinkEmission1CenterOut; + float _AudioLinkEmission1CenterOutwidth; + float _AudioLinkEmission1CenterOutSize; + float _AudioLinkEmission1CenterOutBand; +#endif + +#ifdef POI_EMISSION_2 + + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap2; + #endif + float4 _EmissionMap2_ST; + float2 _EmissionMap2Pan; + float _EmissionMap2UV; + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask2; + #endif + float4 _EmissionMask2_ST; + float2 _EmissionMask2Pan; + float _EmissionMask2UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve2; + #endif + float4 _EmissionScrollingCurve2_ST; + + float4 _EmissionColor2; + float _EmissionBaseColorAsMap2; + float _EmissionStrength2; + float _EnableEmission2; + float _EmissionHueShift2; + float _EmissionHueShiftSpeed2; + float4 _EmissiveScroll_Direction2; + float _EmissiveScroll_Width2; + float _EmissiveScroll_Velocity2; + float _EmissiveScroll_Interval2; + float _EmissionBlinkingEnabled2; + float _EmissiveBlink_Min2; + float _EmissiveBlink_Max2; + float _EmissiveBlink_Velocity2; + float _ScrollingEmission2; + float _EnableGITDEmission2; + float _GITDEMinEmissionMultiplier2; + float _GITDEMaxEmissionMultiplier2; + float _GITDEMinLight2; + float _GITDEMaxLight2; + float _GITDEWorldOrMesh2; + float _EmissionCenterOutEnabled2; + float _EmissionCenterOutSpeed2; + float _EmissionHueShiftEnabled2; + float _EmissionBlinkingOffset2; + float _EmissionScrollingOffset2; + float _EmissionScrollingVertexColor2; + float _EmissionScrollingUseCurve2; + float _EmissionReplace2; + float _EmissionColor2ThemeIndex; + + // Audio Link + float _EmissionAL2Enabled; + float2 _EmissionAL2StrengthMod; + float _EmissionAL2StrengthBand; + float2 _AudioLinkEmission2CenterOut; + float _AudioLinkEmission2CenterOutwidth; + float _AudioLinkEmission2CenterOutSize; + float _AudioLinkEmission2CenterOutBand; +#endif + +#ifdef POI_EMISSION_3 + + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap3; + #endif + float4 _EmissionMap3_ST; + float2 _EmissionMap3Pan; + float _EmissionMap3UV; + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask3; + #endif + float4 _EmissionMask3_ST; + float2 _EmissionMask3Pan; + float _EmissionMask3UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve3; + #endif + float4 _EmissionScrollingCurve3_ST; + + float4 _EmissionColor3; + float _EmissionBaseColorAsMap3; + float _EmissionStrength3; + float _EnableEmission3; + float _EmissionHueShift3; + float _EmissionHueShiftSpeed3; + float4 _EmissiveScroll_Direction3; + float _EmissiveScroll_Width3; + float _EmissiveScroll_Velocity3; + float _EmissiveScroll_Interval3; + float _EmissionBlinkingEnabled3; + float _EmissiveBlink_Min3; + float _EmissiveBlink_Max3; + float _EmissiveBlink_Velocity3; + float _ScrollingEmission3; + float _EnableGITDEmission3; + float _GITDEMinEmissionMultiplier3; + float _GITDEMaxEmissionMultiplier3; + float _GITDEMinLight3; + float _GITDEMaxLight3; + float _GITDEWorldOrMesh3; + float _EmissionCenterOutEnabled3; + float _EmissionCenterOutSpeed3; + float _EmissionHueShiftEnabled3; + float _EmissionBlinkingOffset3; + float _EmissionScrollingOffset3; + float _EmissionScrollingVertexColor3; + float _EmissionScrollingUseCurve3; + float _EmissionReplace3; + float _EmissionColor3ThemeIndex; + + // Audio Link + float _EmissionAL3Enabled; + float2 _EmissionAL3StrengthMod; + float _EmissionAL3StrengthBand; + float2 _AudioLinkEmission3CenterOut; + float _AudioLinkEmission3CenterOutwidth; + float _AudioLinkEmission3CenterOutSize; + float _AudioLinkEmission3CenterOutBand; +#endif + +#T#Emission0Function +float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) +{ + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; +} + +float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) +{ + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; +} + +float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) +{ + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; +} + +void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) +{ + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionStrengthMod.x, emissionStrengthMod.y, poiMods.audioLink[emissionStrengthBand]); + } + #endif +} + +void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) +{ + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionToAdd.x, emissionToAdd.y, getBandAtTime(band, saturate(1 - nDotV), width, size)); + } + #endif +} + +#ifdef _EMISSION + float3 applyEmission(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // First Emission + float3 emission0 = 0; + float emissionStrength0 = _EmissionStrength; + float3 emissionColor0 = 0; + + #K#POI_EMISSION0_MODS + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(_GITDEMinLight, _GITDEMaxLight, _GITDEMinEmissionMultiplier, _GITDEMaxEmissionMultiplier, _EnableGITDEmission, _GITDEWorldOrMesh, poiLight); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionMap_ST), _EmissionMapPan).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap_ST.xy) + _Time.x * _EmissionCenterOutSpeed).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + #else + emissionColor0 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + #endif + + //UNITY_BRANCH + if (_ScrollingEmission) + { + float3 pos = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor) + { + pos = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionScrollingCurve_ST) + (dot(pos, _EmissiveScroll_Direction.xyz) * _EmissiveScroll_Interval) + _Time.x * _EmissiveScroll_Velocity).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(_EmissiveScroll_Direction.xyz, _EmissiveScroll_Velocity, _EmissiveScroll_Interval, _EmissiveScroll_Width, _EmissionScrollingOffset, pos); + } + } + + //UNITY_BRANCH + if (_EmissionBlinkingEnabled) + { + emissionStrength0 *= calculateBlinkingEmission(_EmissiveBlink_Min, _EmissiveBlink_Max, _EmissiveBlink_Velocity, _EmissionBlinkingOffset); + } + + emissionColor0 = hueShift(emissionColor0, frac(_EmissionHueShift + _EmissionHueShiftSpeed * _Time.x) * _EmissionHueShiftEnabled); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, poiUV(poiMesh.uv[_EmissionMaskUV], _EmissionMask_ST) + _Time.x * _EmissionMaskPan).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission != 4) + { + emissionMask0 *= blackLightMask[_BlackLightMaskEmission]; + } + #endif + + applyALEmmissionStrength(poiMods, emissionStrength0, _EmissionAL0StrengthMod, _EmissionAL0StrengthBand, _EmissionAL0Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength0, _AudioLinkEmission0CenterOutwidth, _AudioLinkEmission0CenterOutSize, _AudioLinkEmission0CenterOutBand, _AudioLinkEmission0CenterOut, _EmissionAL0Enabled); + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = max(emissionStrength0 * emissionColor0, 0); + + #ifdef POI_DISSOLVE + //UNITY_BRANCH + if (_DissolveEmissionSide != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, _DissolveEmissionSide); + } + #endif + + // poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emission0 + emission1), _EmissionReplace * poiMax(emission0 + emission1)); + + poiFragData.emission += emission0; + return emission0 * _EmissionReplace0; + } +#endif + +#ifdef POI_EMISSION_1 + float3 applyEmission1(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + emissionStrength1 = _EmissionStrength1; + #K#POI_EMISSION1_MODS + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(_GITDEMinLight1, _GITDEMaxLight1, _GITDEMinEmissionMultiplier1, _GITDEMaxEmissionMultiplier1, _EnableGITDEmission1, _GITDEWorldOrMesh1, poiLight); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled1) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionMap1_ST), _EmissionMap1Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap1_ST.xy) + _Time.x * _EmissionCenterOutSpeed1).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + #else + emissionColor1 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission1) + { + float3 pos1 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor1) + { + pos1 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve1) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionScrollingCurve1_ST) + (dot(pos1, _EmissiveScroll_Direction1) * _EmissiveScroll_Interval1) + _Time.x * _EmissiveScroll_Velocity1); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(_EmissiveScroll_Direction1, _EmissiveScroll_Velocity1, _EmissiveScroll_Interval1, _EmissiveScroll_Width1, _EmissionScrollingOffset1, pos1); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled1) + { + emissionStrength1 *= calculateBlinkingEmission(_EmissiveBlink_Min1, _EmissiveBlink_Max1, _EmissiveBlink_Velocity1, _EmissionBlinkingOffset1); + } + + emissionColor1 = hueShift(emissionColor1, frac(_EmissionHueShift1 + _EmissionHueShiftSpeed1 * _Time.x) * _EmissionHueShiftEnabled1); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, poiUV(poiMesh.uv[_EmissionMask1UV], _EmissionMask1_ST) + _Time.x * _EmissionMask1Pan); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission2 != 4) + { + emissionMask1 *= blackLightMask[_BlackLightMaskEmission2]; + } + #endif + applyALEmmissionStrength(poiMods, emissionStrength1, _EmissionAL1StrengthMod, _EmissionAL1StrengthBand, _EmissionAL1Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength1, _AudioLinkEmission1CenterOutwidth, _AudioLinkEmission1CenterOutSize, _AudioLinkEmission1CenterOutBand, _AudioLinkEmission1CenterOut, _EmissionAL1Enabled); + + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = max(emissionStrength1 * emissionColor1, 0); + + poiFragData.emission += emission1; + return emission1 * _EmissionReplace1; + } +#endif + +#ifdef POI_EMISSION_2 + float3 applyEmission2(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission2 = 0; + float emissionStrength2 = 0; + float3 emissionColor2 = 0; + + emissionStrength2 = _EmissionStrength2; + #K#POI_EMISSION2_MODS + + float glowInTheDarkMultiplier2 = calculateGlowInTheDark(_GITDEMinLight2, _GITDEMaxLight2, _GITDEMinEmissionMultiplier2, _GITDEMaxEmissionMultiplier2, _EnableGITDEmission2, _GITDEWorldOrMesh2, poiLight); + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled2) + { + emissionColor2 = POI2D_SAMPLER_PAN(_EmissionMap2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionMap2_ST), _EmissionMap2Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + else + { + emissionColor2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap2, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap2_ST.xy) + _Time.x * _EmissionCenterOutSpeed2).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + #else + emissionColor2 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission2) + { + float3 pos2 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor2) + { + pos2 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve2) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + emissionStrength2 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionScrollingCurve2_ST) + (dot(pos2, _EmissiveScroll_Direction2) * _EmissiveScroll_Interval2) + _Time.x * _EmissiveScroll_Velocity2); + #endif + } + else + { + emissionStrength2 *= calculateScrollingEmission(_EmissiveScroll_Direction2, _EmissiveScroll_Velocity2, _EmissiveScroll_Interval2, _EmissiveScroll_Width2, _EmissionScrollingOffset2, pos2); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled2) + { + emissionStrength2 *= calculateBlinkingEmission(_EmissiveBlink_Min2, _EmissiveBlink_Max2, _EmissiveBlink_Velocity2, _EmissionBlinkingOffset2); + } + + emissionColor2 = hueShift(emissionColor2, frac(_EmissionHueShift2 + _EmissionHueShiftSpeed2 * _Time.x) * _EmissionHueShiftEnabled2); + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + float emissionMask2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask2, _MainTex, poiUV(poiMesh.uv[_EmissionMask2UV], _EmissionMask2_ST) + _Time.x * _EmissionMask2Pan); + #else + float emissionMask2 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask2 *= blackLightMask[_BlackLightMaskEmission2]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength2, _EmissionAL2StrengthMod, _EmissionAL2StrengthBand, _EmissionAL2Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength2, _AudioLinkEmission2CenterOutwidth, _AudioLinkEmission2CenterOutSize, _AudioLinkEmission2CenterOutBand, _AudioLinkEmission2CenterOut, _EmissionAL2Enabled); + emissionStrength2 *= glowInTheDarkMultiplier2 * emissionMask2; + emission2 = max(emissionStrength2 * emissionColor2, 0); + + poiFragData.emission += emission2; + return emission2 * _EmissionReplace2; + } +#endif + +#ifdef POI_EMISSION_3 + float3 applyEmission3(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission3 = 0; + float emissionStrength3 = 0; + float3 emissionColor3 = 0; + + emissionStrength3 = _EmissionStrength3; + #K#POI_EMISSION3_MODS + + float glowInTheDarkMultiplier3 = calculateGlowInTheDark(_GITDEMinLight3, _GITDEMaxLight3, _GITDEMinEmissionMultiplier3, _GITDEMaxEmissionMultiplier3, _EnableGITDEmission3, _GITDEWorldOrMesh3, poiLight); + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled3) + { + emissionColor3 = POI2D_SAMPLER_PAN(_EmissionMap3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionMap3_ST), _EmissionMap3Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + else + { + emissionColor3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap3, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap3_ST.xy) + _Time.x * _EmissionCenterOutSpeed3).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + #else + emissionColor3 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission3) + { + float3 pos3 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor3) + { + pos3 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve3) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + emissionStrength3 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionScrollingCurve3_ST) + (dot(pos3, _EmissiveScroll_Direction3) * _EmissiveScroll_Interval3) + _Time.x * _EmissiveScroll_Velocity3); + #endif + } + else + { + emissionStrength3 *= calculateScrollingEmission(_EmissiveScroll_Direction3, _EmissiveScroll_Velocity3, _EmissiveScroll_Interval3, _EmissiveScroll_Width3, _EmissionScrollingOffset3, pos3); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled3) + { + emissionStrength3 *= calculateBlinkingEmission(_EmissiveBlink_Min3, _EmissiveBlink_Max3, _EmissiveBlink_Velocity3, _EmissionBlinkingOffset3); + } + + emissionColor3 = hueShift(emissionColor3, frac(_EmissionHueShift3 + _EmissionHueShiftSpeed3 * _Time.x) * _EmissionHueShiftEnabled3); + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + float emissionMask3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask3, _MainTex, poiUV(poiMesh.uv[_EmissionMask3UV], _EmissionMask3_ST) + _Time.x * _EmissionMask3Pan); + #else + float emissionMask3 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask3 *= blackLightMask[_BlackLightMaskEmission3]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength3, _EmissionAL3StrengthMod, _EmissionAL3StrengthBand, _EmissionAL3Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength3, _AudioLinkEmission3CenterOutwidth, _AudioLinkEmission3CenterOutSize, _AudioLinkEmission3CenterOutBand, _AudioLinkEmission3CenterOut, _EmissionAL3Enabled); + emissionStrength3 *= glowInTheDarkMultiplier3 * emissionMask3; + emission3 = max(emissionStrength3 * emissionColor3, 0); + + poiFragData.emission += emission3; + return emission3 * _EmissionReplace3; + } +#endif + +#T#Emission0FunctionCall +#if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; +#endif + +#ifdef _EMISSION + emissionBaseReplace += applyEmission(poiFragData, poiMesh, poiLight, poiCam, poiMods); +#endif +#ifdef POI_EMISSION_1 + emissionBaseReplace += applyEmission1(poiFragData, poiMesh, poiLight, poiCam, poiMods); +#endif +#ifdef POI_EMISSION_2 + emissionBaseReplace += applyEmission2(poiFragData, poiMesh, poiLight, poiCam, poiMods); +#endif +#ifdef POI_EMISSION_3 + emissionBaseReplace += applyEmission3(poiFragData, poiMesh, poiLight, poiCam, poiMods); +#endif + +#if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection.meta new file mode 100644 index 00000000..b9d0d914 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Emission/VRLTC_PoiEmission.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e886f03f2c324ad42a9a8bea4c883146 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting.meta new file mode 100644 index 00000000..9c23d537 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f5a19798e8e488844b64cc09d15435da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset new file mode 100644 index 00000000..8da65ae6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiEnvironmentalRimLighting + m_EditorClassIdentifier: + Id: PoiEnvironmentalRimLighting + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -3993454541605892577, guid: b363d6bc86b03744ba759dc800cb2c01, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3948090449290682600, guid: b363d6bc86b03744ba759dc800cb2c01, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2316926174616042486, guid: b363d6bc86b03744ba759dc800cb2c01, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2670439467891335751, guid: b363d6bc86b03744ba759dc800cb2c01, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2808026140713147783, guid: b363d6bc86b03744ba759dc800cb2c01, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset.meta new file mode 100644 index 00000000..44497d02 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLM_PoiEnvironmentalRimLighting.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 323595f0f7b6edf4cb15bb2efb502b1e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection new file mode 100644 index 00000000..dbc14f57 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection @@ -0,0 +1,76 @@ +#T#PoiEnviroRimProperties + +[HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 +[HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 +_RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 +_RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 +_RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 +_RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 +_RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 +_RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 +[HideInInspector] m_end_reflectionRim ("", Float) = 0 + +#T#PoiEnviroRimKeywords +#pragma shader_feature_local POI_ENVIRORIM + +#T#PoiEnviroRimVariables +#ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; +#endif + +#T#PoiEnviroRimFunctions +#ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } +#endif + +#T#PoiEnviroRimFunctionCalls +#ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection.meta new file mode 100644 index 00000000..0d0bfbfa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_EnvironemntalRimLighting/VRLT_PoiEnvironmentalRimLighting.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b363d6bc86b03744ba759dc800cb2c01 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook.meta new file mode 100644 index 00000000..e6901f33 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbbc3f9d11ce75c4fbd6357e7a9a29be +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset new file mode 100644 index 00000000..87c840f1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiFlipBook + m_EditorClassIdentifier: + Id: PoiFlipBook + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 468801361928852424, guid: 9be9eb990cf45624fbceece1fa13246e, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5625291620187084813, guid: 9be9eb990cf45624fbceece1fa13246e, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8262160126928909595, guid: 9be9eb990cf45624fbceece1fa13246e, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -9094161560837025753, guid: 9be9eb990cf45624fbceece1fa13246e, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2467491175612427558, guid: 9be9eb990cf45624fbceece1fa13246e, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset.meta new file mode 100644 index 00000000..77d28ae4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLM_PoiFlipBook.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fa6a8182af062384f8a7269b3b977701 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection new file mode 100644 index 00000000..9801d919 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection @@ -0,0 +1,234 @@ +#T#PoiFlipbookProperties +// Flipbook +[HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 +[HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 +[ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 +[ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 +[ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 +[TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } +[HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 +_FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 +_FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 +_FlipbookTotalFrames ("Total Frames", Float) = 1 +_FlipbookFPS ("FPS", Float) = 30.0 +_FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) +_FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) +[ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 +_FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_FlipbookRotation ("Rotation", Range(0, 360)) = 0 +_FlipbookRotationSpeed ("Rotation Speed", Float) = 0 +_FlipbookReplace ("Replace", Range(0, 1)) = 1 +_FlipbookMultiply ("Multiply", Range(0, 1)) = 0 +_FlipbookAdd ("Add", Range(0, 1)) = 0 + +//Flipbook audio link +[HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +[ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 +_FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 +[HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + +// Flipbook Manual Control +[HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 +_FlipbookCurrentFrame ("Current Frame", Float) = -1 +[HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + +[HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 +[ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 +[MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) +[HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + +[HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 +[ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 +_FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 +_FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 +[HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 +[HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + +#T#PoiFlipbookKeywords +#pragma shader_feature _SUNDISK_HIGH_QUALITY + +#T#PoiFlipbookVariables +#ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif +#endif + +#T#PoiFlipbookFunctions +#ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + +#endif + +#T#PoiFlipbookFunctionCalls +#ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection.meta new file mode 100644 index 00000000..a69c771d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_FlipBook/VRLT_PoiFlipBook.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9be9eb990cf45624fbceece1fa13246e +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter.meta new file mode 100644 index 00000000..458bdf0f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53432274956cac1418a24da6d5a96681 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset new file mode 100644 index 00000000..855cbc53 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiGlitter + m_EditorClassIdentifier: + Id: PoiGlitter + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6674075362108041796, guid: a91f66ed376eafe4c91aa46885cfb65d, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2574627815413050499, guid: a91f66ed376eafe4c91aa46885cfb65d, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -676358006659427922, guid: a91f66ed376eafe4c91aa46885cfb65d, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2523060630619729502, guid: a91f66ed376eafe4c91aa46885cfb65d, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5138560042189380952, guid: a91f66ed376eafe4c91aa46885cfb65d, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset.meta new file mode 100644 index 00000000..8b8fd426 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLM_PoiGlitter.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4064ea730840a5d478e92b13b02cc0aa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection new file mode 100644 index 00000000..4a09bf34 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection @@ -0,0 +1,348 @@ +#T#PoiGlitterProperties +// Glitter +[HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 +[HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 +[Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 +[Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 +[Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 +[HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 +_GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 +_GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 +[HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) +_GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 +_GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } +[HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) +_GlitterTextureRotation ("Rotation Speed", Float) = 0 +_GlitterFrequency ("Glitter Density", Float) = 300.0 +_GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 +_GlitterSpeed ("Glitter Speed", Float) = 10.0 +_GlitterSize ("Glitter Size", Range(0, 1)) = .3 +_GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 +_GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 +_GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 +_GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 +_GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 +_GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 +_GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 +_glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 +_GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + +[Space(10)] +[ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 +_GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 +_GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + +[Space(10)] +[ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 +[MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) +[MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) +[ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 +[MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) +[ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + +[HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + +#T#PoiGlitterKeywords +#pragma shader_feature _SUNDISK_SIMPLE + +#T#PoiGlitterVariables +#ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiGlitterFunctions +#ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + + break; + } + + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } +#endif + +#T#PoiGlitterFunctionCalls +#ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection.meta new file mode 100644 index 00000000..4f905a04 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Glitter/VRLT_PoiGlitter.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a91f66ed376eafe4c91aa46885cfb65d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes.meta new file mode 100644 index 00000000..952e457d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67027073133b1174995b2e9206bb0305 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset new file mode 100644 index 00000000..9cdecc54 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiGlobalThemes + m_EditorClassIdentifier: + Id: PoiGlobalThemes + Name: ' ' + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -7585804469979682759, guid: 4ccad5f250ff8474f8239d4203bd24ae, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 101 + - Template: {fileID: -6808326827169014852, guid: 4ccad5f250ff8474f8239d4203bd24ae, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8540258180305812497, guid: 4ccad5f250ff8474f8239d4203bd24ae, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4258173811219213278, guid: 4ccad5f250ff8474f8239d4203bd24ae, + type: 3} + Keywords: + - FRAGMENT_BASE_INIT + - FRAGMENT_ADD_INIT + - FRAGMENT_META_INIT + - FRAGMENT_OUTLINE_INIT + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset.meta new file mode 100644 index 00000000..e125a6c3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLM_PoiGlobalThemes.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b31e45db8cd95d14da3f7883f0c503bf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection new file mode 100644 index 00000000..21b7fff9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection @@ -0,0 +1,26 @@ +#T#PoiGlobalThemesProperties +[HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 +_GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) +_GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) +_GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) +_GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) +[HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + +#T#PoiGlobalThemesVariables +float4 _GlobalThemeColor0; +float4 _GlobalThemeColor1; +float4 _GlobalThemeColor2; +float4 _GlobalThemeColor3; + +#T#PoiGlobalThemesFunctions +void calculateGlobalThemes(inout PoiMods poiMods) +{ + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; +} + +#T#PoiGlobalThemesFunctionCalls +calculateGlobalThemes(poiMods); + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection.meta new file mode 100644 index 00000000..1d834691 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GlobalThemes/VRLT_PoiGlobalThemes.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4ccad5f250ff8474f8239d4203bd24ae +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending.meta new file mode 100644 index 00000000..50e4fc9a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f05ba6498098b77439da2fb605a9329d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset new file mode 100644 index 00000000..e46ab9db --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiGrabPassBlending + m_EditorClassIdentifier: + Id: PoiGrabPassBlending + Name: PoiGrabPassBlending + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -8569073471433149719, guid: 01ea791aea70edf4ca86b6cfd7d62803, + type: 3} + Keywords: + - GRABPASS_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4027773651112422098, guid: 01ea791aea70edf4ca86b6cfd7d62803, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5243857318732962380, guid: 01ea791aea70edf4ca86b6cfd7d62803, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5693624181038966058, guid: 01ea791aea70edf4ca86b6cfd7d62803, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5505961644144012038, guid: 01ea791aea70edf4ca86b6cfd7d62803, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING_EARLY + - FRAGMENT_ADD_LIGHTING_EARLY + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset.meta new file mode 100644 index 00000000..2a2aca48 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLM_PoiGrabPassBlending.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5119f130ff4a2b41bdebe9457caceb3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection new file mode 100644 index 00000000..df5ec9ca --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection @@ -0,0 +1,184 @@ +#T#PoiGrabPassBlendingProperties +[HideInInspector] m_start_GrabPass ("GrabPass Transparency--{reference_property:_EnableGrabpass}", Float) = 0 +[HideInInspector][ToggleUI] _EnableGrabpass ("Enable GrabPass", Float) = 1 +[ToggleUI]_GrabPassUseAlpha ("Use Alpha", Float) = 1 +_GrabPassBlendMap ("Blend Map--{reference_properties:[_GrabPassBlendMapPan, _GrabPassBlendMapUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_GrabPassBlendMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, distorteduv0, 4)] _GrabPassBlendMapUV ("UV", Int) = 0 +_GrabPassBlendFactor ("Blend Amount", Range(0, 1)) = 1 +[Enum(UnityEngine.Rendering.BlendMode)] _GrabSrcBlend ("Source Blend", Int) = 2 +[Enum(UnityEngine.Rendering.BlendMode)] _GrabDstBlend ("Destination Blend", Int) = 0 +[HideInInspector] m_start_Refraction ("Refraction--{reference_property:_RefractionEnabled}", Float) = 0 +[ToggleUI] _RefractionEnabled ("Enable Refraction,", Float) = 0 +_RefractionIndex ("Refraction", Range(0, 3)) = 1.333333 +_RefractionChromaticAberattion ("Chromatic Aberration", Range(0, 1)) = 0 +[HideInInspector] m_end_Refraction ("Refraction", Float) = 0 +[HideInInspector] m_start_Blur ("Blur--{reference_property:_EnableBlur}", Float) = 0 +[HideInInspector][ThryToggle(CHROMATIC_ABERRATION_LOW)]_EnableBlur ("Enable Blur", Float) = 0 +_GrabBlurDistance ("Blur Distance", Range(0, 1)) = 0 +[IntRange]_GrabBlurQuality ("Blur Quality", Range(1, 10)) = 2 +[IntRange]_GrabBlurDirections ("Blur Directions", Range(1, 10)) = 4 +[HideInInspector] m_end_Blur ("Blur", Float) = 0 +[HideInInspector] m_end_GrabPass ("GrabPass Transparency", Float) = 0 + +#T#PoiGrabPassBlendingKeywords +#pragma shader_feature CHROMATIC_ABERRATION_LOW + +#T#PoiGrabPassBlendingVariables +sampler2D _PoiGrab2; // Grabpass texture +float _RefractionIndex; +float _RefractionOpacity; +float _RefractionChromaticAberattion; +float _RefractionEnabled; +float _GrabSrcBlend; +float _GrabDstBlend; +float _GrabPassUseAlpha; +float _GrabPassBlendFactor; +float _GrabBlurDistance; +float _GrabBlurQuality; +float _GrabBlurDirections; + +#if defined(PROP_GRABPASSBLENDMAP) || !defined(OPTIMIZER_ENABLED) +#endif +Texture2D _GrabPassBlendMap; +float4 _GrabPassBlendMap_ST; +float2 _GrabPassBlendMapPan; +float _GrabPassBlendMapUV; +float _EnableGrabpass; +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiGrabPassBlendingFunctions +float4 blur(float2 uv) +{ + float two_pi = 6.28318530718; + + float2 radius = _GrabBlurDistance / _ScreenParams.xy * 100; // Arbitrary constant to match old blur + float quality = floor(_GrabBlurQuality); + float directions = floor(_GrabBlurDirections); + + // Pixel colour + float4 color = tex2D(_PoiGrab2, uv); + + float deltaAngle = two_pi / directions; + float deltaQuality = 1.0 / quality; + for (int i = 0; i < directions; i++) + { + for (int j = 0; j < quality; j++) + { + float angle = deltaAngle * i + j; + float offset = deltaQuality * (j + 1); + color += tex2D(_PoiGrab2, uv + float2(cos(angle), sin(angle)) * radius * offset); + } + } + + // Output to screen + color /= quality * directions + 1; + return color; +} + +inline float4 Refraction(float indexOfRefraction, float chromaticAberration, float2 projectedGrabPos, in PoiMesh poiMesh, in PoiCam poiCam) +{ + float4 refractionColor; + float3 worldViewDir = normalize(UnityWorldSpaceViewDir(poiMesh.worldPos)); + float3 refractionOffset = ((((indexOfRefraction - 1.0) * mul(UNITY_MATRIX_V, float4(poiMesh.normals[1], 0.0)).xyz) * (1.0 / (poiCam.grabPos.z + 1.0))) * (1.0 - dot(poiMesh.normals[1], worldViewDir))); + float2 cameraRefraction = float2(refractionOffset.x, - (refractionOffset.y * _ProjectionParams.x)); + + UNITY_BRANCH + if (_RefractionChromaticAberattion > 0) + { + float4 redAlpha = tex2D(_PoiGrab2, (projectedGrabPos + cameraRefraction)); + float green = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 - chromaticAberration)))).g; + float blue = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 + chromaticAberration)))).b; + refractionColor = float4(redAlpha.r, green, blue, redAlpha.a); + } + else + { + float2 refractedGrab = projectedGrabPos + cameraRefraction; + + #ifdef CHROMATIC_ABERRATION_LOW + refractionColor = blur(refractedGrab); + #else + refractionColor = tex2D(_PoiGrab2, (refractedGrab)); + #endif + } + return refractionColor; +} + +void calculateRefraction(float2 projectedGrabPos, inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) +{ + float3 refraction = 1; + UNITY_BRANCH + if (_RefractionEnabled == 1) + { + refraction = Refraction(_RefractionIndex, _RefractionChromaticAberattion, projectedGrabPos, poiMesh, poiCam).rgb; + } + else + { + #ifdef CHROMATIC_ABERRATION_LOW + refraction = blur(projectedGrabPos); + #else + refraction = tex2Dproj(_PoiGrab2, poiCam.grabPos).rgb; + #endif + } + + float blendTexture = POI2D_SAMPLER_PAN(_GrabPassBlendMap, _MainTex, poiUV(poiMesh.uv[_GrabPassBlendMapUV], _GrabPassBlendMap_ST), _GrabPassBlendMapPan).r; + float blendFactor = _GrabPassBlendFactor * blendTexture; + + UNITY_BRANCH + if (_GrabPassUseAlpha) + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor)); + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor))); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor * (1 - poiFragData.alpha)); + poiFragData.baseColor = poiFragData.finalColor; + } + else + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= 1 - blendFactor; + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, 1 - blendFactor); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor); + poiFragData.baseColor = poiFragData.finalColor; + } +} + +float2 calculateGrabPosition(in PoiCam poiCam) +{ + float4 grabPos = poiCam.grabPos; + #if UNITY_UV_STARTS_AT_TOP + float scale = -1.0; + #else + float scale = 1.0; + #endif + float halfPosW = grabPos.w * 0.5; + grabPos.y = (grabPos.y - halfPosW) * _ProjectionParams.x * scale + halfPosW; + #if SHADER_API_D3D9 || SHADER_API_D3D11 + grabPos.w += 0.00000000001; + #endif + return(grabPos / grabPos.w).xy; +} + +void applyGrabEffects(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) +{ + float2 projectedGrabPos = calculateGrabPosition(poiCam); + calculateRefraction(projectedGrabPos, poiFragData, poiCam, poiMesh, poiLight); +} + +#T#PoiGrabPassBlendingFunctionCalls +if (_EnableGrabpass) +{ + applyGrabEffects(poiFragData, poiCam, poiMesh, poiLight); + poiFragData.alpha = 1; +} + + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection.meta new file mode 100644 index 00000000..d8d9f933 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_GrabPassBlending/VRLT_PoiGrabPassBlending.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 01ea791aea70edf4ca86b6cfd7d62803 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence.meta new file mode 100644 index 00000000..403a27c6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f43012e5eac33a94fb8cdaaf88709671 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset new file mode 100644 index 00000000..4dcaf002 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiIridescence + m_EditorClassIdentifier: + Id: PoiIridescence + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 6210173484297843397, guid: ddc9a6e94d474a54a8a4a4389108d81e, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6936321703260370569, guid: ddc9a6e94d474a54a8a4a4389108d81e, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6732280407877423164, guid: ddc9a6e94d474a54a8a4a4389108d81e, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2957254199012007502, guid: ddc9a6e94d474a54a8a4a4389108d81e, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5538459318472071944, guid: ddc9a6e94d474a54a8a4a4389108d81e, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset.meta new file mode 100644 index 00000000..59eebd47 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLM_PoiIridescence.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 716171a7172b1ef499b84a4882ebfc61 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection new file mode 100644 index 00000000..196c725d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection @@ -0,0 +1,129 @@ +#T#PoiIridescenceProperties + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + + // Iridescence Audio Link + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 +#T#PoiIridescenceKeywords +#pragma shader_feature_local POI_IRIDESCENCE + +#T#PoiIridescenceVariables +#ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; +#endif + +#T#PoiIridescenceFunctions +#ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } +#endif + +#T#PoiIridescenceFunctionCalls +#ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection.meta new file mode 100644 index 00000000..aad59394 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Iridescence/VRLT_PoiIridescence.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ddc9a6e94d474a54a8a4a4389108d81e +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData.meta new file mode 100644 index 00000000..85ed21b8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 015b829b7a413c74f82ae5993c0c331b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset new file mode 100644 index 00000000..756588e9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset @@ -0,0 +1,61 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiFeatureLightData + m_EditorClassIdentifier: + Id: PoiLightingData + Name: Lighting Data + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -3260364577294069857, guid: 77e8ca7519e234b40956d0df5a2d172a, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 739758214699481729, guid: 77e8ca7519e234b40956d0df5a2d172a, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5671169289357256051, guid: 77e8ca7519e234b40956d0df5a2d172a, + type: 3} + Keywords: + - FRAGMENT_BASE_INIT + - FRAGMENT_ADD_INIT + - FRAGMENT_OUTLINE_INIT + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4710351450627577817, guid: 77e8ca7519e234b40956d0df5a2d172a, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset.meta new file mode 100644 index 00000000..0ff19f78 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLM_PoiFeatureLightData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c4ea6b952ecdc0c40b07a6cc27e2ed67 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection new file mode 100644 index 00000000..8e041a51 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection @@ -0,0 +1,478 @@ +#T#PoiLightingDataBasePassProps + +[HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 +// Lighting Data +_LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } +[HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 +[HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 +[HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 +[HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 +[HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 +_LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } +[HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 +[HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 +[HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 +[HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 +[HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 +_LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } +[HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 +[HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 +[HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 +[HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 +[HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 +// Base Pass +[Space(15)] +[ThryHeaderLabel(Base Pass Lighting, 13)] +[Space(4)] +[Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 +[Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 +[Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 +[Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) +[ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 +_LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 +_Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 +[ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 +_LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 +_LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 +_LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 +_LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 +_LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 +_LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 +// Lighting Additive +[Space(15)] +[ThryHeaderLabel(Add Pass Lighting, 13)] +[Space(4)] +[ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 +[ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 +[ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 +_LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 +_LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 +_LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 +// Vertex Lighting +[Space(15)] +[ThryHeaderLabel(Vertex Lighting, 13)] +[Space(4)] +[ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 +// Lighting Data Debug +[Space(15)] +[ThryHeaderLabel(Debug Visualization, 13)] +[Space(4)] +[ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 +[ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + +[HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + + +#T#PoiLightingDataKeywords +#pragma shader_feature_local POI_LIGHT_DATA_DEBUG +#pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE +#pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE +#pragma shader_feature_local POI_VERTEXLIGHT_ON + +#T#PoiLightingDataVariables +#if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; +#endif +float4 _LightingAOMaps_ST; +float2 _LightingAOMapsPan; +float _LightingAOMapsUV; +float _LightDataAOStrengthR; +float _LightDataAOStrengthG; +float _LightDataAOStrengthB; +float _LightDataAOStrengthA; + +#if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; +#endif +float4 _LightingDetailShadowMaps_ST; +float2 _LightingDetailShadowMapsPan; +float _LightingDetailShadowMapsUV; +float _LightingDetailShadowStrengthR; +float _LightingDetailShadowStrengthG; +float _LightingDetailShadowStrengthB; +float _LightingDetailShadowStrengthA; + +#if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; +#endif +float4 _LightingShadowMasks_ST; +float2 _LightingShadowMasksPan; +float _LightingShadowMasksUV; +float _LightingShadowMaskStrengthR; +float _LightingShadowMaskStrengthG; +float _LightingShadowMaskStrengthB; +float _LightingShadowMaskStrengthA; + +// Lighting Data +float _Unlit_Intensity; +float _LightingColorMode; +float _LightingMapMode; +float _LightingDirectionMode; +float3 _LightngForcedDirection; +float _LightingIndirectUsesNormals; +float _LightingCapEnabled; +float _LightingCap; +float _LightingForceColorEnabled; +float3 _LightingForcedColor; +float _LightingForcedColorThemeIndex; +float _LightingCastedShadows; +float _LightingMonochromatic; +float _LightingAdditiveMonochromatic; +float _LightingMinLightBrightness; +// Additive Lighting Data +float _LightingAdditiveLimited; +float _LightingAdditiveLimit; +float _LightingAdditivePassthrough; +// Lighting Data Debug +float _LightingDebugVisualize; + + +#T#PoiLightingDataImplementation + +poiLight.finalLightAdd = 0; +#if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); +#else + poiLight.occlusion = 1; +#endif +#if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); +#else + poiLight.detailShadow = 1; +#endif +#if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); +#else + poiLight.shadowMask = 1; +#endif + +#ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #K#BASE_LIGHTDATA_MOD + +#endif + +#ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; +#endif + +#ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection.meta new file mode 100644 index 00000000..703635db --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_LightData/VRLTC_PoiLightData.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 77e8ca7519e234b40956d0df5a2d172a +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main.meta new file mode 100644 index 00000000..76338fc2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a77646d9d50da814ba7a303e2067f5fe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset new file mode 100644 index 00000000..4644e654 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiFeatureMain + m_EditorClassIdentifier: + Id: PoiFeatureMain + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -8827392273085209421, guid: 8aa8bb54ef5088348acc4d7ec157ee38, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4290662500990495517, guid: 8aa8bb54ef5088348acc4d7ec157ee38, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7263456333445960440, guid: 8aa8bb54ef5088348acc4d7ec157ee38, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5159234061367281123, guid: 8aa8bb54ef5088348acc4d7ec157ee38, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4233938919722665711, guid: 8aa8bb54ef5088348acc4d7ec157ee38, + type: 3} + Keywords: + - FRAGMENT_NORMAL_CALCULATIION + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset.meta new file mode 100644 index 00000000..42056484 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLM_PoiFeatureMain.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1ac0430d20d06645af4f4e9f7ef5a68 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection new file mode 100644 index 00000000..89d341cf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection @@ -0,0 +1,149 @@ + +#T#PoiMainProperties +//Main-main +_Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 +_MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 +[HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) +[Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } +[HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 +[HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 +_ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } +[HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 +_Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + +[HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 +[HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 +_MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 +_Saturation ("Saturation", Range(-1, 10)) = 0 +_MainBrightness ("Brightness", Range(-1, 1)) = 0 +[ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 +[ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 +_MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 +_MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + +[Space(4)] +[ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 +[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 +_MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 +[HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + +#T#PoiMainKeywords +#pragma shader_feature COLOR_GRADING_HDR + +#T#PoiMainVariables +float4 _Color; +float _ColorThemeIndex; +UNITY_DECLARE_TEX2D(_MainTex); +float4 _MainTex_ST; +float2 _MainTexPan; +float _MainTexUV; +float4 _MainTex_TexelSize; +Texture2D _BumpMap; +float4 _BumpMap_ST; +float2 _BumpMapPan; +float _BumpMapUV; +float _BumpScale; +Texture2D _ClippingMask; +float4 _ClippingMask_ST; +float2 _ClippingMaskPan; +float _ClippingMaskUV; +float _Inverse_Clipping; +float _Cutoff; + +float _MainColorAdjustToggle; +#if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; +#endif +float4 _MainColorAdjustTexture_ST; +float2 _MainColorAdjustTexturePan; +float _MainColorAdjustTextureUV; +float _MainHueShiftToggle; +float _MainHueShiftReplace; +float _MainHueShift; +float _MainHueShiftSpeed; +float _Saturation; +float _MainBrightness; + +float _MainHueALCTEnabled; +float _MainALHueShiftBand; +float _MainALHueShiftCTIndex; +float _MainHueALMotionSpeed; + +SamplerState sampler_linear_clamp; +SamplerState sampler_linear_repeat; + +#T#PoiMainImplementation +poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); +poiFragData.alpha = mainTexture.a * _Color.a; + +#ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); +#endif + +#if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } +#else + float alphaMask = 1; +#endif + +poiFragData.alpha *= alphaMask; + +#K#BASE_COLOR_MOD + +#T#PoiMainNormalImplementation +float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); +poiMesh.tangentSpaceNormal = mainNormal; + +#K#TANGENT_NORMAL_INJECTION + +poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] +); + +// I'm just testing this because it makes it the same as if there is no normal map in the slot +float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); +poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] +); diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection.meta new file mode 100644 index 00000000..252da12f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Main/VRLTC_PoiMain.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8aa8bb54ef5088348acc4d7ec157ee38 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap.meta new file mode 100644 index 00000000..ab647ccb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d8e5ebde9cb43d940a08bd6092935489 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset new file mode 100644 index 00000000..56fff1df --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiMatcap + m_EditorClassIdentifier: + Id: PoiMatcap + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -2182619564246226311, guid: 82d2c1746fab1c84ca332a0c9b1365d9, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2087455637341696803, guid: 82d2c1746fab1c84ca332a0c9b1365d9, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1417246634682005262, guid: 82d2c1746fab1c84ca332a0c9b1365d9, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1381761008998162736, guid: 82d2c1746fab1c84ca332a0c9b1365d9, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -858239333561969455, guid: 82d2c1746fab1c84ca332a0c9b1365d9, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset.meta new file mode 100644 index 00000000..948f7579 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLM_PoiMatcap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f43a4e8f8b031949b76535ca295e1c2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection new file mode 100644 index 00000000..23fd458a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection @@ -0,0 +1,363 @@ +#T#PoiMatcapProperties +// First Matcap +[HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 +[HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 +[ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 +_MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 +[TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } +_MatcapBorder ("Border", Range(0, .5)) = 0.43 +_MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 +_MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_MatcapIntensity ("Intensity", Range(0, 5)) = 1 +_MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 +_MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 +_MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 +_MatcapAdd ("Add Matcap", Range(0, 1)) = 0 +_MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 +[Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + +[Space(10)] +[ThryHeaderLabel(Custom Normal, 13)] +[Space(4)] +[ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 +[Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } +[HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 +[HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + +[Space(10)] +[ThryHeaderLabel(Hue Shift, 13)] +[Space(4)] +[ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 +_MatcapHueShiftSpeed ("Shift Speed", Float) = 0 +_MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 +[HideInInspector] m_end_matcap ("Matcap", Float) = 0 + +// Second Matcap +[HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 +[HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 +[ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 +_Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 +[TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } +_Matcap2Border ("Border", Range(0, .5)) = 0.43 +_Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 +_Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 +_Matcap2Intensity ("Intensity", Range(0, 5)) = 1 +_Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 +_Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 +_Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 +_Matcap2Add ("Add Matcap", Range(0, 1)) = 0 +_Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 +[Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + +[Space(10)] +[ThryHeaderLabel(Custom Normal, 13)] +[Space(4)] +[ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 +[Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } +[HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 +[HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + +[Space(10)] +[ThryHeaderLabel(Hue Shift, 13)] +[Space(4)] +[ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 +_Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 +_Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 +[HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + +#T#PoiMatcapKeywords +#pragma shader_feature COLOR_GRADING_HDR_3D +#pragma shader_feature_local POI_MATCAP0 +#pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL +#pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + +#T#PoiMatcapVariables +#ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; +#endif + +#ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; +#endif + +#T#PoiMatcapFunctions +void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask +#ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex +#endif +) +{ + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; +} + +#if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } +#endif + +#T#PoiMatcapFunctionCalls +#if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection.meta new file mode 100644 index 00000000..6d722e87 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Matcap/VRLT_PoiMatcap.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 82d2c1746fab1c84ca332a0c9b1365d9 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular.meta new file mode 100644 index 00000000..8f292930 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 04c00332f84c30e40b396483d9f20db3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset new file mode 100644 index 00000000..adc8ee15 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiMetallicsAndSpecular + m_EditorClassIdentifier: + Id: PoiMetallicsAndSpecular + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6819928926812745680, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6493675183849458555, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6781150339162069738, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -724528389572503919, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7265303828516322307, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset.meta new file mode 100644 index 00000000..6693b07f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLM_PoiMetallicsAndSpecular.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c023dffc58a8dce41948529003e1d1e6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection new file mode 100644 index 00000000..db3de656 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection @@ -0,0 +1,265 @@ +#T#PoiMetallicsAndSpecularProperties + +[HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 +[HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + +_MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 +_MochieSpecularStrength ("Specular", Range(0, 1)) = 1 +_MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 +_MochieRoughnessMultiplier ("Smoothness", Range(0, 1)) = 1 + +_MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 +_MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 +[Space(8)] + + +[RGBAAtlas(Metallic Map, Smoothness Map, Reflection Mask, Specular Mask)]_MochieMetallicMaps ("Maps [Expand]--{reference_properties:[_MochieMetallicMapsPan, _MochieMetallicMapsUV, _MochieMetallicMapInvert, _MochieRoughnessMapInvert, _MochieReflectionMaskInvert, _MochieSpecularMaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_MochieMetallicMapsPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapsUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert Metallic", Float) = 0 +[HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert Smoothness", Float) = 0 +[HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert Reflection Mask", Float) = 0 +[HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert Specular Mask", Float) = 0 +[Space(8)] + +[ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } +[ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 +[ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + +[HideInInspector] m_end_brdf ("", Float) = 0 + + +#T#PoiMetallicsAndSpecularKeywords +#pragma shader_feature_local MOCHIE_PBR + +#T#PoiMetallicsAndSpecularVariables + +#ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + +#endif + +#T#PoiMetallicsAndSpecularFunction +#ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + #K#MOCHIE_METALLIC_SMOOTHNESS_MOD + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + +#endif + +#T#PoiMetallicsAndSpecularFunctionCall +#if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection.meta new file mode 100644 index 00000000..05044419 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_MetallicsAndSpecular/VRLTC_PoiMetallicsAndSpecular.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ced12d09ef1669843a6b9308486023d5 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror.meta new file mode 100644 index 00000000..44f91ab6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 095b34f783ca16f4f8308a5643488bae +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset new file mode 100644 index 00000000..ab423217 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiMirror + m_EditorClassIdentifier: + Id: PoiMirror + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6020610729609772193, guid: 48228288a6886d0428d6f8f7f54f5dde, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -9121663864202923002, guid: 48228288a6886d0428d6f8f7f54f5dde, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -905330163477477095, guid: 48228288a6886d0428d6f8f7f54f5dde, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -8778409245144489639, guid: 48228288a6886d0428d6f8f7f54f5dde, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1134796289705639206, guid: 48228288a6886d0428d6f8f7f54f5dde, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset.meta new file mode 100644 index 00000000..dc3f9e32 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLM_PoiMirror.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c32b683e3283a8b4f988b0e9a73227d4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection new file mode 100644 index 00000000..4263bc0c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection @@ -0,0 +1,54 @@ +#T#PoiMirrorProperties + +// Mirror Rendering +[HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 +[HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 +[ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 +_MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } +[HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 +[HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + +#T#PoiMirrorKeywords +#pragma shader_feature_local POI_MIRROR + +#T#PoiMirrorVariables +#ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; +#endif + +#T#PoiMirrorFunctions +#ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } +#endif + +#T#PoiMirrorFunctionCalls +#ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection.meta new file mode 100644 index 00000000..cc63cbc5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Mirror/VRLT_PoiMirror.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 48228288a6886d0428d6f8f7f54f5dde +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions.meta new file mode 100644 index 00000000..2fe883c0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e42fd58ff341239489c630f2e61fa308 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset new file mode 100644 index 00000000..aa1bcd9d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiOutline + m_EditorClassIdentifier: + Id: PoiOutline + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -4903798584879128224, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - OUTLINE_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7443870826643623366, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - RENDERING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2331320928318850917, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3653031401299456880, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7582676733983041614, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3269725437333061151, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - VERTEX_MODS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2140364123699222201, guid: 0afda4a341794f34799f57933c326c0f, + type: 3} + Keywords: + - FRAGMENT_NORMAL_CALCULATIION + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset.meta new file mode 100644 index 00000000..000fff1d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLM_PoiOutline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a500e18ef22aa3f438fb7f1a4b34ac5f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection new file mode 100644 index 00000000..97aa4cd6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection @@ -0,0 +1,182 @@ +#T#PoiOutlineProperties +// Outline Vertex +[HideInInspector][ToggleUI]_EnableOutlines ("Enable Outlines", float) = 0 +[Enum(Basic, 0, Tint, 1, Rim Light, 2, Directional, 3, DropShadow, 4)]_OutlineMode ("Mode", Int) = 0 +_OutlineTintMix ("Tint Mix--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==1}}", Range(0, 1)) = 0 +_OutlineRimLightBlend ("Rim Light Blend--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==2}}", Range(0, 1)) = 0 +_OutlinePersonaDirection ("directional Offset XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==3}}", Vector) = (1, 0, 0, 0) +_OutlineDropShadowOffset ("Drop Direction XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==4}}", Vector) = (1, 0, 0, 0) +[ToggleUI]_OutlineFixedSize ("Fixed Size?", Float) = 0 +_OutlinesMaxDistance ("Fixed Size Max Distance", Float) = 9999 +[Enum(Off, 0, Normals, 1, Mask VC.r, 2)]_OutlineUseVertexColors ("Vertex Color", Float) = 0 +[ToggleUI]_OutlineLit ("Enable Lighting", Float) = 1 +_LineWidth ("Width", Float) = 0 +_LineColor ("Color--{reference_property:_LineColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LineColorThemeIndex ("", Int) = 0 +_OutlineEmission ("Outline Emission", Float) = 0 +_OutlineTexture ("Outline Texture--{reference_properties:[_OutlineTexturePan, _OutlineTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_OutlineTexturePan ("Outline Texture Pan", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _OutlineTextureUV ("UV", Int) = 0 +_OutlineMask ("Outline Mask--{reference_properties:[_OutlineMaskPan, _OutlineMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_OutlineMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _OutlineMaskUV ("UV", Int) = 0 +_OutlineShadowStrength ("Shadow Strength", Range(0, 1)) = 1 +[Header(Hue Shift)] +[ToggleUI]_OutlineHueShift ("Hue Shift?", Float) = 0 +_OutlineHueOffset ("Shift", Range(0, 1)) = 0 +_OutlineHueOffsetSpeed ("Shift Speed", Float) = 0 +[HideInInspector] m_start_outlineAdvanced ("Advanced", Float) = 0 +_Offset_Z ("Cam Z Offset", Float) = 0 +[Vector2]_OutlineFadeDistance ("Outline distance Fade", Vector) = (0, 0, 0, 0) +[Enum(UnityEngine.Rendering.CullMode)] _OutlineCull ("Cull", Float) = 1 +[Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Float) = 4 +_OutlineOffsetFactor ("Offset Factor", Float) = 0 +_OutlineOffsetUnits ("Offset Units", Float) = 0 +[HideInInspector] m_end_outlineAdvanced ("Advanced", Float) = 0 + +#T#PoiOutlineStencilProperties +// Outline Stencil +[HideInInspector] m_start_OutlineStencil ("Outline Stencil", Float) = 0 +[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.StencilOp)] _OutlineStencilPassOp ("Stencil Pass Op", Float) = 0 +[Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFailOp ("Stencil Fail Op", Float) = 0 +[Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFailOp ("Stencil ZFail Op", Float) = 0 +[Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilCompareFunction ("Stencil Compare Function", Float) = 8 +[HideInInspector] m_end_OutlineStencil ("Outline Stencil", Float) = 0 + +#T#PoiOutlineVariables +#ifdef POI_PASS_OUTLINE + // outline Vertex Options + float _OutlineMode; + float4 _OutlinePersonaDirection; + float4 _OutlineDropShadowOffset; + float _OutlineUseVertexColors; + float _OutlineFixedSize; + float _EnableOutlines; + float _OutlinesMaxDistance; + float _LineWidth; + float _OutlineEmission; + float4 _LineColor; + texture2D _OutlineTexture; //TODO make this dynamically not read for lock in + float4 _OutlineTexture_ST; + float2 _OutlineTexturePan; + float _OutlineTextureUV; + float4 _OutlineFadeDistance; + float4 _OutlineGlobalPan; + sampler2D _OutlineMask; + float4 _OutlineMask_ST; + float2 _OutlineMaskPan; + float _OutlineMaskUV; + float _OutlineRimLightBlend; + float _OutlineLit; + float _OutlineTintMix; + half _OutlineHueOffset; + half _OutlineHueShift; + half _OutlineHueOffsetSpeed; + float _OutlineShadowStrength; + float _LineColorThemeIndex; + float _Offset_Z; +#endif + +#T#OutlineVertexOffset +#ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; +#endif + +#T#OutlineFragmentFunction +#ifdef POI_PASS_OUTLINE + void applyOutlineColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + clip(_EnableOutlines - 0.01); + float OutlineMask = tex2D(_OutlineMask, TRANSFORM_TEX(poiMesh.uv[_OutlineMaskUV], _OutlineMask) + _Time.x * _OutlineMaskPan).r; + clip(OutlineMask * _LineWidth - 0.001); + float4 col = POI2D_SAMPLER_PAN(_OutlineTexture, _MainTex, poiUV(poiMesh.uv[_OutlineTextureUV], _OutlineTexture_ST), _OutlineTexturePan) * float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a); + //UNITY_BRANCH + if (_OutlineMode == 0) + { + poiFragData.baseColor = col; + } + //UNITY_BRANCH + if (_OutlineMode == 1) + { + poiFragData.baseColor = lerp(float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a), poiFragData.baseColor, _OutlineTintMix) * col; + } + //UNITY_BRANCH + if (_OutlineMode == 2) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, poiLight.directColor, _OutlineRimLightBlend) * col; + } + + poiFragData.alpha *= col.a; + + // Hue shift + //UNITY_BRANCH + if (_OutlineHueShift) + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, _OutlineHueOffset +_OutlineHueOffsetSpeed * _Time.x); + } + } +#endif + +#T#OutlineFragmentFunctionCall +#ifdef POI_PASS_OUTLINE + applyOutlineColor(poiFragData, poiMesh, poiLight, poiMods); +#endif + +#T#OutlineForceSmoothNormals +#ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection.meta new file mode 100644 index 00000000..b520cc96 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_OutlineOptions/VRLT_PoiOutline.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0afda4a341794f34799f57933c326c0f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations.meta new file mode 100644 index 00000000..b7d08576 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff2d7019c4dea72449a135edcf99b458 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset new file mode 100644 index 00000000..3951b755 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset @@ -0,0 +1,58 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPPAnimations + m_EditorClassIdentifier: + Id: PoiPPAnimations + Name: Poi Post Processing Animations + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -1615086477176747248, guid: 1fa59a8489d3d8645a06835869bc9be4, + type: 3} + Keywords: + - POSTPROCESSING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2682924898931065746, guid: 1fa59a8489d3d8645a06835869bc9be4, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5946799268947004886, guid: 1fa59a8489d3d8645a06835869bc9be4, + type: 3} + Keywords: + - BASE_LIGHTDATA_MOD + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3874476704323829493, guid: 1fa59a8489d3d8645a06835869bc9be4, + type: 3} + Keywords: + - FRAGMENT_BASE_RETURN + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset.meta new file mode 100644 index 00000000..57d19e53 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLM_PoiPPAnimations.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fb4c0730864e62847b82733d27c68e77 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection new file mode 100644 index 00000000..57fc0eb2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection @@ -0,0 +1,28 @@ +#T#PoiPPAnimationProperties +[HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 +[Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 +_PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 +_PPLightingAddition ("Lighting Add", Float) = 0 +_PPEmissionMultiplier ("Emission Multiplier", Float) = 1 +_PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 +[HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + +#T#PoiPPAnimationVariables +float _PPLightingMultiplier; +float _PPLightingAddition; +float _PPEmissionMultiplier; +float _PPFinalColorMultiplier; + +#T#PoiPPAnimationLightingMods +#ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); +#endif + +#T#PoiPPAnimationReturnMods +#ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * _PPEmissionMultiplier, 0); + poiFragData.finalColor = max(poiFragData.finalColor * _PPFinalColorMultiplier, 0); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection.meta new file mode 100644 index 00000000..f2ddcbd6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_PPAnimations/VRLT_PoiPPAnimations.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1fa59a8489d3d8645a06835869bc9be4 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax.meta new file mode 100644 index 00000000..b7f06fab --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 879847ebd8beac44682c407dd07c8aee +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset new file mode 100644 index 00000000..009eaf80 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset @@ -0,0 +1,60 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiParallax + m_EditorClassIdentifier: + Id: PoiParallax + Name: + Version: 1.0 + Author: Poiyomi + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 2958623608305138685, guid: 5421a815090ed5f46886e81054503dc6, + type: 3} + Keywords: + - MODIFIER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 648514650132905148, guid: 5421a815090ed5f46886e81054503dc6, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -3162434232064884689, guid: 5421a815090ed5f46886e81054503dc6, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5588223921123518788, guid: 5421a815090ed5f46886e81054503dc6, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7647173271999149458, guid: 5421a815090ed5f46886e81054503dc6, + type: 3} + Keywords: + - MESH_DATA_INIT + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset.meta new file mode 100644 index 00000000..0d662528 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLM_PoiParallax.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 043008fa06fb38b4992021bf79cbf726 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection new file mode 100644 index 00000000..c40f1f07 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection @@ -0,0 +1,238 @@ +#T#PoiParallaxProperties +[HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 +[HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + +[ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + +/* +[ThryTexture]_Heightmask ("Mask--{reference_properties:[_HeightmaskPan, _HeightmaskUV, _HeightmaskInvert]}", 2D) = "white" { } +[HideInInspector][Vector2]_HeightmaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ToggleUI]_HeightmaskInvert ("Invert", Float) = 0 +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightmaskUV ("UV", Int) = 0 +*/ + +_HeightStrength ("Strength", Range(0, 1)) = 0.4247461 +//_HeightOffset ("Offset", Range(-1, 1)) = 0 +_CurvatureU ("Curvature U", Range(0, 100)) = 0 +_CurvatureV ("Curvature V", Range(0, 30)) = 0 +[IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 +[IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 +_CurvFix ("Curvature Bias", Range(0, 1)) = 1 +// [ThryToggle]_ParallaxUV0 ("UV0", Float) = 0 +// [ThryToggle]_ParallaxUV1 ("UV1", Float) = 0 +// [ThryToggle]_ParallaxUV2 ("UV2", Float) = 0 +// [ThryToggle]_ParallaxUV3 ("UV3", Float) = 0 +// [ThryToggle]_ParallaxPano ("Panosphere", Float) = 0 +// [ThryToggle]_ParallaxWorldPos ("World Pos", Float) = 0 +// [ThryToggle]_ParallaxPolar ("Polar", Float) = 0 +// [ThryToggle]_ParallaxDist ("Distorted UV", Float) = 0 + +[HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + +#T#PoiParallaxKeywords +#pragma shader_feature_local POI_PARALLAX + +#T#PoiParallaxVariables +#ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ +#endif + +#T#PoiParallaxFunctions +#ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } +#endif + +#T#PoiParallaxFunctionCalls +#ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection.meta new file mode 100644 index 00000000..54f9091e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Parallax/VRLT_PoiParallax.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5421a815090ed5f46886e81054503dc6 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing.meta new file mode 100644 index 00000000..19ba0ea3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24a6b098e5bba6845bd53832acc200a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset new file mode 100644 index 00000000..ad2bfbe9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPathing + m_EditorClassIdentifier: + Id: PoiPathing + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 1701925533823509526, guid: 3b45bf65230d67b43a806def94ac7e90, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1352157454681663311, guid: 3b45bf65230d67b43a806def94ac7e90, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2900613551932229239, guid: 3b45bf65230d67b43a806def94ac7e90, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 995888076669092081, guid: 3b45bf65230d67b43a806def94ac7e90, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4368677990598912658, guid: 3b45bf65230d67b43a806def94ac7e90, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset.meta new file mode 100644 index 00000000..839a1681 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLM_PoiPathing.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72833ee6f6673a74591288f51c29a1a5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection new file mode 100644 index 00000000..bbe0ecce --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection @@ -0,0 +1,230 @@ +#T#PoiPathingProperties + +[HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 +[HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 +[ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 +[HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) +_PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 +[HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) +[Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 +[Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 +[Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 +[HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 +[HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 +[HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 +[Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) +[Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) +[Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) +[Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + +[Header(Timing Options)] +[Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) +[Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) +[Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + +[HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 +// Time Offsets +[Header(Time Offset)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 +[Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 +[Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + +[Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) +[HideInInspector] m_end_PathAudioLink ("", Float) = 0 +[HideInInspector] m_end_pathing ("", Float) = 0 + +#T#PoiPathingKeywords +#pragma shader_feature_local POI_PATHING + +#T#PoiPathingVariables +#ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif +#endif + + +#T#PoiPathingFunctions +#ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } +#endif + +#T#PoiPathingFunctionCalls +#ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection.meta new file mode 100644 index 00000000..15bf6ff5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Pathing/VRLT_PoiPathing.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3b45bf65230d67b43a806def94ac7e90 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions.meta new file mode 100644 index 00000000..32d247fa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b860f5b1cb611a840ae6a3a00f5d9ee4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset new file mode 100644 index 00000000..38518bc1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset @@ -0,0 +1,48 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiRenderingOptions + m_EditorClassIdentifier: + Id: PoiRenderingOptions + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 7318007729894128928, guid: ed47affb5a93a5f40a8062f9754c2dd5, + type: 3} + Keywords: + - RENDERING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6216851525493451465, guid: ed47affb5a93a5f40a8062f9754c2dd5, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset.meta new file mode 100644 index 00000000..4ef1e6cb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLM_PoiRenderingOptions.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d579766a4789fda4cb17f70f66ba2087 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection new file mode 100644 index 00000000..dabf1be0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection @@ -0,0 +1,22 @@ +#T#RenderOptionsProperties +[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 +[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 +[Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 +[Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 +_OffsetFactor ("Offset Factor", Float) = 0.0 +_OffsetUnits ("Offset Units", Float) = 0.0 +[ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 +[ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 +[HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + +// Blending Options +[HideInInspector] m_start_blending ("Blending", Float) = 0 +[Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 +[Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 +[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 +[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 +[HideInInspector] m_end_blending ("Blending", Float) = 0 + +#T#RenderOptionsVariables +float _IgnoreFog; +float _RenderingReduceClipDistance; \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection.meta new file mode 100644 index 00000000..423a50c3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RenderingOptions/VRLTC_PoiRenderingOptions.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ed47affb5a93a5f40a8062f9754c2dd5 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking.meta new file mode 100644 index 00000000..67f2414e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 18fd908c1e4a134448398a7982fec606 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset new file mode 100644 index 00000000..7e935f65 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiRgbaMasking + m_EditorClassIdentifier: + Id: PoiRgbaMasking + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 827532881488706831, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4758280836822683577, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -8042204140870693562, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1016060815673424455, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4847150405867878178, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - TANGENT_NORMAL_INJECTION + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8128342358615841458, guid: e903e78c92ed15e4ebc33cc362c6ee75, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset.meta new file mode 100644 index 00000000..5124a6db --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLM_PoiRgbaMasking.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d4c7f67c175e0f4ea39ab2469736a5f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection new file mode 100644 index 00000000..5c01eb19 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection @@ -0,0 +1,287 @@ +#T#PoiRGBAMaskingProperties +// RGBA Masking +[HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 +[HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 +[ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 +[ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 +[RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 +_RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 +_RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 +_GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 +_GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 +_BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 +_BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 +_AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 +_AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + +// RGB MASKED NORMALS +[ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 +[ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 +[Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } +[HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 +_RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 +[Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } +[HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 +_RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 +[Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } +[HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 +_RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 +[Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } +[HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 +_RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 +[HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + +#T#PoiRGBAMaskingKeywords +#pragma shader_feature VIGNETTE +#pragma shader_feature GEOM_TYPE_MESH + +#T#PoiRGBAMaskingVariables +#ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiRGBAMaskingFunctions +#ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } +#endif + +#T#PoiRGBAMaskingColorFunctionCall +#ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); +#endif + +#T#PoiRGBAMaskingNormalFunctionCall +#if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection.meta new file mode 100644 index 00000000..ba8ef3d1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RgbaMasking/VRLT_PoiRgbaMasking.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e903e78c92ed15e4ebc33cc362c6ee75 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting.meta new file mode 100644 index 00000000..951a9863 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 899063e66391a374aa64e5ef02d56687 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset new file mode 100644 index 00000000..fe7a03d9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiRimLighting + m_EditorClassIdentifier: + Id: PoiRimLighting + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -837330465047085578, guid: 6076984dd1cc9964ab931bf3baf42a03, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 8373507287664635830, guid: 6076984dd1cc9964ab931bf3baf42a03, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5583806141467019457, guid: 6076984dd1cc9964ab931bf3baf42a03, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7271926319060051013, guid: 6076984dd1cc9964ab931bf3baf42a03, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4888288281638204856, guid: 6076984dd1cc9964ab931bf3baf42a03, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_META_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset.meta new file mode 100644 index 00000000..d89a81ed --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLM_PoiRimLighting.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc0df58e896264c4ba4596bdcbe5bc4f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection new file mode 100644 index 00000000..49b9bafb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection @@ -0,0 +1,144 @@ +#T#PoiRimLightProperties +// Rim Lighting +[HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 +[HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 +[Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 +[ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 +_RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 +_RimWidth ("Rim Width", Range(0, 1)) = 0.8 +_RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 +_RimStrength ("Rim Emission", Range(0, 20)) = 0 +_RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 +_RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 +_RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 +_RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + +[Space(10)] +[ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 +_RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 +_RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 +[HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + +#T#PoiRimLightKeywords +#pragma shader_feature _GLOSSYREFLECTIONS_OFF + +#T#PoiRimLightVariables +#ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiRimLightFunction +#ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } +#endif + +#T#PoiRimLightFunctionCall +#ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection.meta new file mode 100644 index 00000000..dbdff357 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_RimLighting/VRLT_PoiRimLighting.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6076984dd1cc9964ab931bf3baf42a03 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading.meta new file mode 100644 index 00000000..7526acdd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8771008ae24ae8149b0f85d594f7d0bb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset new file mode 100644 index 00000000..e090ee6c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset @@ -0,0 +1,104 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiShading + m_EditorClassIdentifier: + Id: PoiShading + Name: + Version: + Author: + Description: + EnableProperties: [] + Properties: + - Name: _ClothDFG + DisplayName: dfg + Type: 2D + DefaultValue: '"black" {}' + DefaultTextureAsset: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, + type: 3} + Attributes: + - NonModifiableTextureData + - NoScaleOffset + - Name: _SkinLUT + DisplayName: skinlut + Type: 2D + DefaultValue: '"white" {}' + DefaultTextureAsset: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, + type: 3} + Attributes: + - NoScaleOffset + - Name: _ToonRamp + DisplayName: Lighting Ramp + Type: 2D + DefaultValue: '"white" {}' + DefaultTextureAsset: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, + type: 3} + Attributes: + - Gradient + - NoScaleOffset + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6259013273614755871, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1282086300987554519, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6644858586408048110, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5102879639948164799, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -8003877868991691674, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5386411766019591273, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1135440906463919864, guid: cdaebb04eaf8cc542849582fbf47c200, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset.meta new file mode 100644 index 00000000..5ea028d7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLM_PoiShading.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8fd22f54e96edd478df063aebadd55f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection new file mode 100644 index 00000000..476a22e7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection @@ -0,0 +1,873 @@ +#T#PoiShadingProperties +[HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 +[HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 +[ThryHeaderLabel(Base Pass Shading, 13)] +[Space(4)] +[KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 +_LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) +[Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } +_ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 +_LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 +_LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 +_LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 +_LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + +// Shade Maps +_1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) +_1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } +[HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 +[HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 +[ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 +_2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) +_2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } +[HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 +[HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 +[HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 +[ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 +_BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 +_BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 +_ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 +_1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 +[Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 +//DJ Wrapped +_LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 +_LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 +// Realistic +_LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 +// Skin Shading +_SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } +_SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 +[HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 +[HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) +[HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) +// Cloth +[NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } +[ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } +[HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 +[ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 +[Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0 +_ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35, 1)) = 0.5 +_ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0.5 + +// Generic +_ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=4)}", Range(0, 1)) = 1 +_LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + +// Additive +[Space(15)] +[ThryHeaderLabel(Add Pass Shading, 13)] +[Space(4)] +[Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 +_LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 +_LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 +//_LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 //TODO-implement this +[ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 +_LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + +[HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + + +#T#PoiShadingKeywords +#pragma shader_feature VIGNETTE_MASKED +#pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH +#pragma shader_feature_local POI_CLOTHLERP + +#T#PoiShadingVariables +// Toon Lighting +UNITY_DECLARE_TEX2D(_ToonRamp); +float _ShadowOffset; +float _ShadowStrength; +float _LightingIgnoreAmbientColor; +// Math Toon Lighting +float _LightingGradientStart; +float _LightingGradientEnd; +float3 _LightingShadowColor; +float _LightingGradientStartWrap; +float _LightingGradientEndWrap; +// ShadeMap Lighting +float3 _1st_ShadeColor; +Texture2D _1st_ShadeMap; +float4 _1st_ShadeMap_ST; +float2 _1st_ShadeMapPan; +float _1st_ShadeMapUV; +float _Use_1stShadeMapAlpha_As_ShadowMask; +float _1stShadeMapMask_Inverse; +float _Use_BaseAs1st; +float3 _2nd_ShadeColor; +Texture2D _2nd_ShadeMap; +float4 _2nd_ShadeMap_ST; +float2 _2nd_ShadeMapPan; +float _2nd_ShadeMapUV; +float _Use_2ndShadeMapAlpha_As_ShadowMask; +float _2ndShadeMapMask_Inverse; +float _Use_1stAs2nd; +float _BaseColor_Step; +float _BaseShade_Feather; +float _ShadeColor_Step; +float _1st2nd_Shades_Feather; +float _ShadingShadeMapBlendType; +// Realistic Lighting +float _LightingStandardSmoothness; +// Skin +sampler2D _SkinLUT; +float _SssScale; +float _SssBumpBlur; +float3 _SssTransmissionAbsorption; +float3 _SssColorBleedAoWeights; + +// Cloth +#ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; +#endif + + +// Additive +float _LightingAdditiveType; +float _LightingAdditiveGradientStart; +float _LightingAdditiveGradientEnd; +float _LightingAdditiveDetailStrength; +float _LightingAdditiveLimitIntensity; +float _LightingAdditiveMaxIntensity; + +#T#PoiShadingFunction +#ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } +#endif + +#T#PoiCalculateShadingFunctionCall +#ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif +#else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); +#endif + +#T#PoiShadeMapFunctionCall +#if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif +#endif + +#T#PoiApplyShadingFunctionCall +poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; +poiFragData.finalColor += poiLight.finalLightAdd; \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection.meta new file mode 100644 index 00000000..2671423b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_Shading/VRLTC_PoiShading.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cdaebb04eaf8cc542849582fbf47c200 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular.meta new file mode 100644 index 00000000..e8622734 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b6f65973b032c9e42b3f15ac6f653605 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset new file mode 100644 index 00000000..c850e543 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiStylizedSpecular + m_EditorClassIdentifier: + Id: PoiStylizedSpecular + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 1811175688506899900, guid: 9c4cc3fe8a24ded449ad957cb11c9ec0, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7575734690947602720, guid: 9c4cc3fe8a24ded449ad957cb11c9ec0, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6401650772416328856, guid: 9c4cc3fe8a24ded449ad957cb11c9ec0, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -721671918919467234, guid: 9c4cc3fe8a24ded449ad957cb11c9ec0, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 715447138891700941, guid: 9c4cc3fe8a24ded449ad957cb11c9ec0, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset.meta new file mode 100644 index 00000000..99b48e9c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLM_PoiStylizedSpecular.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f9bd413584522542a784451a29f24e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection new file mode 100644 index 00000000..793b9563 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection @@ -0,0 +1,149 @@ +#T#PoiStylizedSpecularProperties +[HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 +[HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + +[ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 +_HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 +_Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } +[HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 +[HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 +[ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 +[ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + +_StylizedSpecularStrength ("Strength", Float) = 1 +[ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 +[Space(8)] + +[ThryHeaderLabel(Layer 1, 13)] +_HighColor_Power ("Size", Range(0, 1)) = 0.2 +_StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 +_Layer1Strength ("Strength", Range(0, 1)) = 1 +[Space(8)] + +[ThryHeaderLabel(Layer 2, 13)] +_Layer2Size ("Size", Range(0, 1)) = 0 +_StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 +_Layer2Strength ("Strength", Range(0, 1)) = 0 +[HideInInspector] m_end_stylizedSpec ("", Float) = 0 +#T#PoiStylizedSpecularKeywords +#pragma shader_feature_local POI_STYLIZED_StylizedSpecular + +#T#PoiStylizedSpecularVariables +#ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; +#endif + +#T#PoiStylizedSpecularFunctions +#ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } +#endif + +#T#PoiStylizedSpecularFunctionCalls +#ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection.meta new file mode 100644 index 00000000..b8bb6e44 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_StylizedSpecular/VRLT_PoiStylizedSpecular.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9c4cc3fe8a24ded449ad957cb11c9ec0 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules.meta new file mode 100644 index 00000000..b6135c6d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7fa5c4554c5a20042b9b6e59b5f9d0c4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset new file mode 100644 index 00000000..0aeaa916 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiUVModifiers + m_EditorClassIdentifier: + Id: PoiUVModifiers + Name: Poi UV Modifiers + Version: 1.0 + Author: poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 1137267932409736290, guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86, + type: 3} + Keywords: + - MODIFIER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6551489311161740089, guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7480898882527584521, guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3318044600056694954, guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5892831066134082021, guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86, + type: 3} + Keywords: + - MESH_DATA_INIT + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset.meta new file mode 100644 index 00000000..cc17dd46 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLM_PoiUVModifiers.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eca31a3b9b86b4b4d8ff5cff9f135f36 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection new file mode 100644 index 00000000..64c1c89c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection @@ -0,0 +1,142 @@ +#T#UVModifierProperties +[HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 +[HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 +_DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 +_DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } +[HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 +_DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } +[HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 +_DistortionStrength ("Strength1", Float) = 0.03 +_DistortionStrength1 ("Strength2", Float) = 0.01 +[HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + +[HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 +[ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 +[ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 +[HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + +[HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 +[Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) +_PolarRadialScale ("Radial Scale", Float) = 1 +_PolarLengthScale ("Length Scale", Float) = 1 +_PolarSpiralPower ("Spiral Power", Float) = 0 +[HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 +#T#UVModifierKeywords +#pragma shader_feature USER_LUT + +#T#UVModifierVariables +#ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; +#endif +float _StereoEnabled; +float _PolarUV; +float2 _PolarCenter; +float _PolarRadialScale; +float _PolarLengthScale; +float _PolarSpiralPower; +float _PanoUseBothEyes; +#T#UVModifierFunctions +float2 calculatePolarCoordinate(in PoiMesh poiMesh) +{ + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); +} + +float2 MonoPanoProjection(float3 coords) +{ + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; +} + +float2 StereoPanoProjection(float3 coords) +{ + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; +} + +float2 calculatePanosphereUV(in PoiMesh poiMesh) +{ + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); +} + +#ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } +#endif + +#T#UVModifierFunctionCalls +poiMesh.uv[4] = calculatePanosphereUV(poiMesh); +poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); +#ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); +#endif +/* +half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); +half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); +poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; +*/ \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection.meta new file mode 100644 index 00000000..a442e230 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_UVModules/VRLTC_PoiUVModifiers.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d4a0caa8fcefd6d4eb0143bb2b4b3f86 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors.meta new file mode 100644 index 00000000..343489c7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f585b5155b9e61c4da4b3437baa83286 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset new file mode 100644 index 00000000..a59f2485 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiVertexColors + m_EditorClassIdentifier: + Id: PoiVertexColor + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 271207279435511190, guid: 771b8b04098480640819e985e32fe9a6, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -3794272589141241811, guid: 771b8b04098480640819e985e32fe9a6, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2042147953404986883, guid: 771b8b04098480640819e985e32fe9a6, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 9020528451422910676, guid: 771b8b04098480640819e985e32fe9a6, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + - FRAGMENT_SHADOW_COLOR + - FRAGMENT_META_COLOR + - FRAGMENT_OUTLINE_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset.meta new file mode 100644 index 00000000..7488c184 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLM_PoiVertexColors.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4a4ba4e31a5f2294289339f643c597ec +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection new file mode 100644 index 00000000..b792f34f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection @@ -0,0 +1,24 @@ +#T#PoiVertexColorsProperties + +[HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 +[ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 +_MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 +_MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 +[HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + +#T#PoiVertexColorsVariables +float _MainVertexColoringLinearSpace; +float _MainVertexColoring; +float _MainUseVertexColorAlpha; + +#T#PoiVertexColorsFunctions +void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) +{ + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); +} +#T#PoiVertexColorsFunctionCalls +applyVertexColor(poiFragData, poiMesh); \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection.meta new file mode 100644 index 00000000..87210110 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexColors/VRLT_PoiVertexColors.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 771b8b04098480640819e985e32fe9a6 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions.meta new file mode 100644 index 00000000..c0925563 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 34ae48c2cd574094c9a0cf392ad11738 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset new file mode 100644 index 00000000..8f1c309b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiVertexOptions + m_EditorClassIdentifier: + Id: PoiVertexOptions + Name: + Version: 1.0 + Author: Poiyomi + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -8596426419263647089, guid: 7b8fd238b4e82df4da5991cabb25ca5e, + type: 3} + Keywords: + - MAIN_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7514852620088275278, guid: 7b8fd238b4e82df4da5991cabb25ca5e, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3005560158877599827, guid: 7b8fd238b4e82df4da5991cabb25ca5e, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4367313652670875460, guid: 7b8fd238b4e82df4da5991cabb25ca5e, + type: 3} + Keywords: + - VERTEX_INPUT_MODS + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset.meta new file mode 100644 index 00000000..3ad418c8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLM_PoiVertexOptions.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24577e7ddd2003a4dad2c8994d4d66a2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection new file mode 100644 index 00000000..21aa6869 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection @@ -0,0 +1,177 @@ +#T#PoiVertexOptionsProperties +[HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 +[HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 +[Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) +[Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) +[Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) +_VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) +[Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) +_VertexManipulationHeight ("Vertex Height", Float) = 0 +_VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } +[HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) +[HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 +_VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 +[ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 +_VertexRoundingDivision ("Division Amount", Float) = 500 + +[Space(10)] +[ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +_VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) +_VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[Space(10)] +[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 +[Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) +[HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + +#T#PoiVertexOptionsKeywords +#pragma shader_feature AUTO_EXPOSURE + +#T#PoiVertexOptionsVariables +#ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiVertexOptionsInputModImplementation +#ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection.meta new file mode 100644 index 00000000..3f164101 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Poi_VertexOptions/VRLT_PoiVertexOptions.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7b8fd238b4e82df4da5991cabb25ca5e +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard.meta new file mode 100644 index 00000000..c000ddce --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c04bcace40c1b4546b9c6b375b4ed2bb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat new file mode 100644 index 00000000..64ff1b78 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat @@ -0,0 +1,2223 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: UDIMDiscard Demo + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_UDIMDISCARD POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_REALISTIC _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2010 + stringTagMap: + OptimizedShaderFolder: 96b167486916ff5468ea4ea71237fa77 + OriginalShader: .poiyomi/V8.0/Pro + _LightingShadowColorAnimated: 1 + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 8d56725e34ac08b4099c066106c69609, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 2800000, guid: 143f8e1f7534fa14889e4ba870f65af7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AOStrength: 1 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphaToMask: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission0Enabled: 0 + - _AudioLinkEmission0StrengthBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1Enabled: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicSpecIgnoresBaseColor: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugCameraData: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugEnabled: 0 + - _DebugHighMids: 0 + - _DebugLightingData: 0 + - _DebugLowMids: 0 + - _DebugMeshData: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMin: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DistortionUvToDistort: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 1 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _Length: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingDirectionMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 6 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMaskUV: 0 + - _LightingShadowMasksUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTexUV: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHelp: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _PanoUseBothEyes: 1 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 2 + - _PathTypeG: 2 + - _PathTypeR: 2 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexUnwrap: 0 + - _VertexWorldTranslationALBand: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.127 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 2 + - _VoronoiType: 2 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_ParallaxMap: 0 + - m_Patreon: 1 + - m_PostProcessing: 0 + - m_Special_Effects: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GlobalThemes: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_depthFX: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_stylizedSpec: 0 + - m_end_subsurface: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvModifiers: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingCategory: 0 + - m_lightingOptions: 0 + - m_mainCategory: 1 + - m_mainOptions: 1 + - m_modifierCategory: 0 + - m_outlineOptions: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_renderingOptions: 0 + - m_specialFXCategory: 1 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GlobalThemes: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 1 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_depthFX: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_stylizedSpec: 0 + - m_start_subsurface: 0 + - m_start_udimdiscardOptions: 1 + - m_start_uvModifiers: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 0.27, g: 0, b: 0, a: 1} + - _PathSpeed: {r: 3, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.17, g: 0, b: 0, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiColor1: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiGradient: {r: -1.01, g: 0.03, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat.meta new file mode 100644 index 00000000..9d90119f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIMDiscard Demo.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96b167486916ff5468ea4ea71237fa77 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx new file mode 100644 index 00000000..41eaeda6 Binary files /dev/null and b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx differ diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx.meta new file mode 100644 index 00000000..f297355c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/UDIM_Demo.fbx.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: dedff525d7aef214abcbde1d4585c233 +ModelImporter: + serializedVersion: 19301 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset new file mode 100644 index 00000000..c7d61c15 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_UDIMDiscard + m_EditorClassIdentifier: + Id: UDIMDiscard + Name: UDIM Discard + Version: + Author: Razgriz + Description: Discard vertices/pixels based on UV tiles (integer coordinate) + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -1734739677135132995, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2356441293131038981, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4832212189132342516, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7587128811217467521, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - VERTEX_INPUT_MODS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5579777886249383457, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 9036976540215735123, guid: 6c4974195326e474c96bdc2a6f0d0706, + type: 3} + Keywords: + - FRAGMENT_BASE_INIT_LATE + - FRAGMENT_ADD_INIT_LATE + - FRAGMENT_SHADOW_INIT_LATE + - FRAGMENT_META_INIT_LATE + - FRAGMENT_OUTLINE_INIT_LATE + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset.meta new file mode 100644 index 00000000..6ebf23a6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLM_UDIMDiscard.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9517bd1cad1457744acd511156823aff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection new file mode 100644 index 00000000..3ac8200e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection @@ -0,0 +1,86 @@ +#T#PoiUDIMDiscardProperties +// SPECIALFX_PROPERTIES + +// UDIM Discard +[HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 +[HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 +[Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 +[Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) +[Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) +[Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) +[Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) +[HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + +#T#PoiUDIMDiscardKeywords +#pragma shader_feature_local POI_UDIMDISCARD + +#T#PoiUDIMDiscardVariables +#ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; +#endif + +#T#PoiUDIMDiscardVertexImplementation +#ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } +#endif + +#T#PoiUDIMDiscardFragFunctions +#ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } +#endif + + + +#T#PoiUDIMDiscardFragFunctionCalls +#ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection.meta new file mode 100644 index 00000000..3dce04a7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/Razgriz_UDIMDiscard/VRLTC_UDIMDiscard.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6c4974195326e474c96bdc2a6f0d0706 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo.meta new file mode 100644 index 00000000..02e31ad2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 50eab8f379e144445a947b7ab2427616 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_.meta new file mode 100644 index 00000000..d8a46c43 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a49914ee562f1f42b219d775efcbdf9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset new file mode 100644 index 00000000..7e05ba24 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset @@ -0,0 +1,70 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_Poi + m_EditorClassIdentifier: + Id: Poi + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 0} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset.meta new file mode 100644 index 00000000..84929a3e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLM_Poi.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98dfb9d67a4866149acbe7790cc56e4c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection.meta new file mode 100644 index 00000000..9f89f8e8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_/VRLT_Poi.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3e2dab571b43fa4469222ec64ecc9dea +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking.meta new file mode 100644 index 00000000..36332387 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fc3947cb72cadb74bb1a1ca7c08cce1e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset new file mode 100644 index 00000000..61bdb071 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset @@ -0,0 +1,70 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiBlackLightMasking + m_EditorClassIdentifier: + Id: PoiBlackLightMasking + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 0} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset.meta new file mode 100644 index 00000000..fd0cada9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLM_PoiBlackLightMasking.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 883f6564ee1d11544ab7c82b2438e3d5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection.meta new file mode 100644 index 00000000..cb6a24c1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_BlackLightMasking/VRLT_PoiBlackLightMasking.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d62caea497d8b4744ada102ce55812e6 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay.meta new file mode 100644 index 00000000..2afc26e0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8cfbb3e433a9c474195836bf52dce00a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset new file mode 100644 index 00000000..f0f06619 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiStatsOverlay + m_EditorClassIdentifier: + Id: PoiStatsOverlay + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -2460612774880091232, guid: fea3fc9cac3952548951892080c28033, + type: 3} + Keywords: + - SPECIALFX_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 358928541890858045, guid: fea3fc9cac3952548951892080c28033, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6657864349166974896, guid: fea3fc9cac3952548951892080c28033, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 2574636835266472983, guid: fea3fc9cac3952548951892080c28033, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2422269806484800515, guid: fea3fc9cac3952548951892080c28033, + type: 3} + Keywords: + - FRAGMENT_BASE_COLOR + - FRAGMENT_ADD_COLOR + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset.meta new file mode 100644 index 00000000..413c8938 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLM_PoiStatsOverlay.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30935ff7d770ce64089fad5d256845d2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection new file mode 100644 index 00000000..0d6096d3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection @@ -0,0 +1,311 @@ +#T#PoiStatsOverlayProperties + +// MSDF OVERLAY +[HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 +_TextGlyphs ("Font Array", 2D) = "black" { } +_TextPixelRange ("Pixel Range", Float) = 4.0 +[HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + +// FPS +[HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 +[HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 +_TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 +_TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +[Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) +_TextFPSRotation ("Rotation", Range(0, 360)) = 0 +[Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) +_TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) +[HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + +// POSITION +[HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 +[HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 +//[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 +_TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 +_TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +[Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) +_TextPositionRotation ("Rotation", Range(0, 360)) = 0 +[Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) +_TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) +[HideInInspector] m_end_TextPosition ("Position", Float) = 0 + +// INSTANCE TIME +[HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 +[HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 +[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 +_TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 +_TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 +[Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) +_TextTimeRotation ("Rotation", Range(0, 360)) = 0 +[Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) +_TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) +[HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 +[HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + +#T#PoiStatsOverlayKeywords +#pragma shader_feature EFFECT_BUMP + +#T#PoiStatsOverlayVariables +#ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + +#endif + +#T#PoiStatsOverlayFunctions +#ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } +#endif + +#T#PoiStatsOverlayFunctionCalls +#ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); +#endif \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection.meta new file mode 100644 index 00000000..06b27cbb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StatsOverlay/VRLT_PoiStatsOverlay.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: fea3fc9cac3952548951892080c28033 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular.meta new file mode 100644 index 00000000..a52d03c1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccbdc87e7b205db46bdc7a516844ef75 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset new file mode 100644 index 00000000..20466e46 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset @@ -0,0 +1,70 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiStylizedAnisoSpecular + m_EditorClassIdentifier: + Id: PoiStylizedAnisoSpecular + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 0} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset.meta new file mode 100644 index 00000000..4026e7d8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLM_PoiStylizedAnisoSpecular.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a72b1acd760c1848b31ff719e6d6e6d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection.meta new file mode 100644 index 00000000..23e48aef --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_StylizedAnisoSpecular/VRLT_PoiStylizedAnisoSpecular.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0a68ec424c77c2643912133cc7f9e4c5 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering.meta new file mode 100644 index 00000000..602f9523 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbb44886d551b9d488f69237378def1c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset new file mode 100644 index 00000000..e3b04ee6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset @@ -0,0 +1,70 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiSubSurfaceScattering + m_EditorClassIdentifier: + Id: PoiSubSurfaceScattering + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 0} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset.meta new file mode 100644 index 00000000..d2372cf0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLM_PoiSubSurfaceScattering.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 711889a3cc0512d4fb46afae76e537ed +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection.meta new file mode 100644 index 00000000..c99a9481 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_SubSurfaceScattering/VRLT_PoiSubSurfaceScattering.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f2e02c53d40958d47a01a3d5cedc3f85 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi.meta new file mode 100644 index 00000000..1c57a0eb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68f4881308a59cc46a7f1b5085532386 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset new file mode 100644 index 00000000..15bc74a0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset @@ -0,0 +1,70 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiVoronoi + m_EditorClassIdentifier: + Id: PoiVoronoi + Name: + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 0} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 0} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset.meta new file mode 100644 index 00000000..2ca6cc74 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLM_PoiVoronoi.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e873142f7e3e85c4e90a649d9a803b68 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection.meta new file mode 100644 index 00000000..1e70e092 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/ToDo/Poi_Voronoi/VRLT_PoiVoronoi.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 68fed8d0dce4efe469998551e286e77b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset new file mode 100644 index 00000000..219c81aa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiModuleTemplate + m_EditorClassIdentifier: + Id: NameHere + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6819928926812745680, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - LIGHTING_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6493675183849458555, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6781150339162069738, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - META_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -724528389572503919, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - FRAGMENT_BASE_FUNCTIONS + - FRAGMENT_ADD_FUNCTIONS + - FRAGMENT_SHADOW_FUNCTIONS + - FRAGMENT_META_FUNCTIONS + - FRAGMENT_OUTLINE_FUNCTIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7265303828516322307, guid: ced12d09ef1669843a6b9308486023d5, + type: 3} + Keywords: + - FRAGMENT_BASE_LIGHTING + - FRAGMENT_ADD_LIGHTING + - FRAGMENT_SHADOW_LIGHTING + - FRAGMENT_META_LIGHTING + - FRAGMENT_OUTLINE_LIGHTING + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset.meta new file mode 100644 index 00000000..72e4b06a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLM_PoiModuleTemplate.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbe780ddb55481c4ca56f7e5974f1518 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection new file mode 100644 index 00000000..d9ecc82b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection @@ -0,0 +1,30 @@ +#T#PoiNameProperties + +#T#PoiNameKeywords +#pragma shader_feature KEYWORD + +#T#PoiNameVariables +#ifdef KEYWORD + +#endif + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; +*/ + +#T#PoiNameFunctions +#ifdef KEYWORD + void function() + { + + } +#endif + +#T#PoiNameFunctionCalls +#ifdef KEYWORD + function(); +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection.meta new file mode 100644 index 00000000..1103e6e6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_FeatureModules/VRLT_PoiTemplateTemplate.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7dec20a0bdc893b41868a5a4c3c49509 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries.meta new file mode 100644 index 00000000..9499ec6c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b74a39dc7e8ac645949074f1ec069d4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset new file mode 100644 index 00000000..bb9d61e6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset @@ -0,0 +1,48 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiHelpers + m_EditorClassIdentifier: + Id: PoiHelpers + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: 9d151ec0fb75338468f0890fd2186a97, + type: 3} + Keywords: + - MACROS_AND_DEFINES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: 4d6c9ab1551b31c4ba90cac4b0f8e3cd, + type: 3} + Keywords: + - VERTEX_BASE_FUNCTIONS_EARLY + - VERTEX_ADD_FUNCTIONS_EARLY + - VERTEX_SHADOW_FUNCTIONS_EARLY + - VERTEX_OUTLINE_FUNCTIONS_EARLY + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset.meta new file mode 100644 index 00000000..e222437b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLM_PoiHelpers.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cda6385aa13bbb847b8e00f80b822a55 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate new file mode 100644 index 00000000..8a98e96f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate @@ -0,0 +1,1250 @@ +float2 poiUV(float2 uv, float4 tex_st) +{ + return uv * tex_st.xy + tex_st.zw; +} + +//Lighting Helpers +float calculateluminance(float3 color) +{ + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; +} + +bool IsInMirror() +{ + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; +} + +bool IsOrthographicCamera() +{ + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; +} + +/* +* MIT License +* +* Copyright (c) 2018 s-ilent +* +* 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. +*/ + +float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) +{ + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); +} + +half3 BetterSH9(half4 normal) +{ + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; +} + +// Silent's code ends here + +float3 getCameraForward() +{ + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); +} + +half3 GetSHLength() +{ + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; +} + +float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) +{ + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; +} + +float poiMax(float2 i) +{ + return max(i.x, i.y); +} + +float poiMax(float3 i) +{ + return max(max(i.x, i.y), i.z); +} + +float poiMax(float4 i) +{ + return max(max(max(i.x, i.y), i.z), i.w); +} + + +float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) +{ + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); +} + +float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) +{ + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); +} + +float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) +{ + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); +} + +float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) +{ + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); +} + +float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) +{ + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); +} + +float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) +{ + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); +} + +float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) +{ + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); +} + +float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) +{ + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); +} + +float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) +{ + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); +} +float2 calcParallax(in float height, in PoiCam poiCam) +{ + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); +} + + +/* +0: Zero float4(0.0, 0.0, 0.0, 0.0), +1: One float4(1.0, 1.0, 1.0, 1.0), +2: DstColor destinationColor, +3: SrcColor sourceColor, +4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, +5: SrcAlpha sourceColor.aaaa, +6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, +7: DstAlpha destinationColor.aaaa, +8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., +9: SrcAlphaSaturate saturate(sourceColor.aaaa), +10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, +*/ + +float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) +{ + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); +} + +// Average +float3 blendAverage(float3 base, float3 blend) +{ + return(base + blend) / 2.0; +} + +// Color burn +float blendColorBurn(float base, float blend) +{ + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); +} + +float3 blendColorBurn(float3 base, float3 blend) +{ + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); +} + +// Color Dodge +float blendColorDodge(float base, float blend) +{ + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); +} + +float3 blendColorDodge(float3 base, float3 blend) +{ + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); +} + +// Darken +float blendDarken(float base, float blend) +{ + return min(blend, base); +} + +float3 blendDarken(float3 base, float3 blend) +{ + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); +} + +// Exclusion +float3 blendExclusion(float3 base, float3 blend) +{ + return base + blend - 2.0 * base * blend; +} + +// Reflect +float blendReflect(float base, float blend) +{ + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); +} + +float3 blendReflect(float3 base, float3 blend) +{ + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); +} + +// Glow +float3 blendGlow(float3 base, float3 blend) +{ + return blendReflect(blend, base); +} + +// Overlay +float blendOverlay(float base, float blend) +{ + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); +} + +float3 blendOverlay(float3 base, float3 blend) +{ + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); +} + +// Hard Light +float3 blendHardLight(float3 base, float3 blend) +{ + return blendOverlay(blend, base); +} + +// Vivid light +float blendVividLight(float base, float blend) +{ + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); +} + +float3 blendVividLight(float3 base, float3 blend) +{ + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); +} + +// Hard mix +float blendHardMix(float base, float blend) +{ + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; +} + +float3 blendHardMix(float3 base, float3 blend) +{ + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); +} + +// Lighten +float blendLighten(float base, float blend) +{ + return max(blend, base); +} + +float3 blendLighten(float3 base, float3 blend) +{ + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); +} + +// Linear Burn +float blendLinearBurn(float base, float blend) +{ + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); +} + +float3 blendLinearBurn(float3 base, float3 blend) +{ + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); +} + +// Linear Dodge +float blendLinearDodge(float base, float blend) +{ + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); +} + +float3 blendLinearDodge(float3 base, float3 blend) +{ + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); +} + +// Linear light +float blendLinearLight(float base, float blend) +{ + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); +} + +float3 blendLinearLight(float3 base, float3 blend) +{ + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); +} + +// Multiply +float3 blendMultiply(float3 base, float3 blend) +{ + return base * blend; +} + +// Negation +float3 blendNegation(float3 base, float3 blend) +{ + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); +} + +// Normal +float3 blendNormal(float3 base, float3 blend) +{ + return blend; +} + +// Phoenix +float3 blendPhoenix(float3 base, float3 blend) +{ + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); +} + +// Pin light +float blendPinLight(float base, float blend) +{ + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); +} + +float3 blendPinLight(float3 base, float3 blend) +{ + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); +} + +// Screen +float blendScreen(float base, float blend) +{ + return 1.0 - ((1.0 - base) * (1.0 - blend)); +} + +float3 blendScreen(float3 base, float3 blend) +{ + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); +} + +// Soft Light +float blendSoftLight(float base, float blend) +{ + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); +} + +float3 blendSoftLight(float3 base, float3 blend) +{ + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); +} + +// Subtract +float blendSubtract(float base, float blend) +{ + return max(base - blend, 0.0); +} + +float3 blendSubtract(float3 base, float3 blend) +{ + return max(base - blend, 0.0); +} + +// Difference +float blendDifference(float base, float blend) +{ + return abs(base - blend); +} + +float3 blendDifference(float3 base, float3 blend) +{ + return abs(base - blend); +} + +// Divide +float blendDivide(float base, float blend) +{ + return base / max(blend, 0.0001); +} + +float3 blendDivide(float3 base, float3 blend) +{ + return base / max(blend, 0.0001); +} + +float3 customBlend(float3 base, float3 blend, float blendType) +{ + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; +} + +float random(float2 p) +{ + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); +} + +float2 random2(float2 p) +{ + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); +} + +float3 random3(float3 p) +{ + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); +} + +float3 randomFloat3(float2 Seed, float maximum) +{ + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); +} + +float3 randomFloat3Range(float2 Seed, float Range) +{ + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; +} + +float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) +{ + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; +} + +void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) +{ + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); +} + +//art + +// Based on unity shader graph code + +// * Adjustments * // + +/* +* Channel Mixer +* +* Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider +* parameters on the node control the contribution of each of the input channels. The toggle button parameters control +* which of the output channels is currently being edited. Slider controls for editing the contribution of each input +* channnel range between -2 and 2. +*/ +void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) +{ + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); +} + +/* +* Contrast +* +* Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input +* unaltered. A Contrast value of 0 will return the midpoint of the input +*/ +void poiContrast(float3 In, float Contrast, out float3 Out) +{ + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; +} + + +/* +* Invert Colors +* +* Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. +*/ +void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) +{ + Out = abs(InvertColors - In); +} + +/* +* Replace Color +* +* Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a +* wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the +* selection similar to anti-aliasing. +*/ +void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) +{ + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); +} + +/* +* Saturation +* +* Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input +* unaltered. A Saturation value of 0 will return the input completely desaturated. +*/ +void poiSaturation(float3 In, float Saturation, out float3 Out) +{ + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); +} + +/* +* Dither Node +* +* Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale +* patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform +* distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. +* +* This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of +* transparency to an opaque object. This is useful for creating objects that appear to be transparent but have +* the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. +*/ +void poiDither(float4 In, float4 ScreenPosition, out float4 Out) +{ + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; +} + +/* +* Color Mask +* +* Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider +* range of values around input Mask Color to create the mask. Colors within this range will return 1, +* otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection +* similar to anti-aliasing. +*/ +void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) +{ + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); +} + +float3 hueShift(float3 color, float Offset) +{ + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); +} + +static const float Epsilon = 1e-10; +// The weights of RGB contributions to luminance. +// Should sum to unity. +static const float3 HCYwts = float3(0.299, 0.587, 0.114); +static const float HCLgamma = 3; +static const float HCLy0 = 100; +static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 +static const float3 wref = float3(1.0, 1.0, 1.0); +#define TAU 6.28318531 + +float3 HUEtoRGB(in float H) +{ + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); +} + +float3 RGBtoHCV(in float3 RGB) +{ + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); +} + +float3 HSVtoRGB(in float3 HSV) +{ + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; +} + +float3 RGBtoHSV(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); +} + +float3 HSLtoRGB(in float3 HSL) +{ + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; +} + +float3 RGBtoHSL(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); +} + +float3 HCYtoRGB(in float3 HCY) +{ + + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; +} + +float3 RGBtoHCY(in float3 RGB) +{ + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); +} + +float3 HCLtoRGB(in float3 HCL) +{ + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; +} + +float3 RGBtoHCL(in float3 RGB) +{ + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; +} + +//HSL MODIFT +float3 ModifyViaHSL(float3 color, float3 HSLMod) +{ + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); +} + +float3 poiSaturation(float3 In, float Saturation) +{ + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); +} +// LCH +float xyzF(float t) +{ + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); +} +float xyzR(float t) +{ + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); +} +float3 rgb2lch(in float3 c) +{ + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); +} + +float3 lch2rgb(in float3 c) +{ + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; +} + +//cheaply lerp around a circle +float lerpAng(in float a, in float b, in float x) +{ + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; +} + +//Linear interpolation between two colors in Lch space +float3 lerpLch(in float3 a, in float3 b, in float x) +{ + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); +} + +float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) +{ + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); +} + +float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) +{ + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); +} + +float4x4 poiRotationMatrixFromAngles(float x, float y, float z) +{ + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); +} + +float4x4 poiRotationMatrixFromAngles(float3 angles) +{ + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); +} + +float3 getCameraPosition() +{ + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; +} + +half2 calcScreenUVs(half4 grabPos) +{ + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; +} + +float CalcMipLevel(float2 texture_coord) +{ + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); +} + +inline float4 CalculateFrustumCorrection() +{ + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); +} + +float inverseLerp(float A, float B, float T) +{ + return(T - A) / (B - A); +} + +float inverseLerp2(float2 a, float2 b, float2 value) +{ + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +float inverseLerp3(float3 a, float3 b, float3 value) +{ + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +float inverseLerp4(float4 a, float4 b, float4 value) +{ + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +/* +MIT License + +Copyright (c) 2019 wraikny + +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. + +VertexTransformShader is dependent on: +*/ + +float4 quaternion_conjugate(float4 v) +{ + return float4( + v.x, -v.yzw + ); +} + +float4 quaternion_mul(float4 v1, float4 v2) +{ + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); +} + +// angle : radians +float4 get_quaternion_from_angle(float3 axis, float angle) +{ + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); +} + +float4 quaternion_from_vector(float3 inVec) +{ + return float4(0.0, inVec); +} + +float degree_to_radius(float degree) +{ + return( + degree / 180.0 * pi + ); +} + +float3 rotate_with_quaternion(float3 inVec, float3 rotation) +{ + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; +} + +float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) +{ + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; +} + +/* +MIT END +*/ + +float aaBlurStep(float gradient, float edge, float blur) +{ + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); +} + +float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) +{ + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate.meta new file mode 100644 index 00000000..ca6633be --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiHelperFunctions.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4d6c9ab1551b31c4ba90cac4b0f8e3cd +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate new file mode 100644 index 00000000..6e1dd0ad --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate @@ -0,0 +1,42 @@ +#define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) +#define pi float(3.14159265359) + +#define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) +#define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) +#define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) +#define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) +#define POI2D(tex, uv) (tex2D(tex, uv)) +#define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) +#define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + +#define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + +#define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) +#define POI_SAFE_RGBA mainTexture + +#if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; +#else + #define PoiInitStruct(type, name) +#endif + +#define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + +#define POI_MODE_OPAQUE 0 +#define POI_MODE_CUTOUT 1 +#define POI_MODE_FADE 2 +#define POI_MODE_TRANSPARENT 3 +#define POI_MODE_ADDITIVE 4 +#define POI_MODE_SOFTADDITIVE 5 +#define POI_MODE_MULTIPLICATIVE 6 +#define POI_MODE_2XMULTIPLICATIVE 7 +#define POI_MODE_TRANSCLIPPING 9 + +/* +Texture2D ; +float4 _ST; +float2 Pan; +float UV; + +[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] +*/ \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate.meta new file mode 100644 index 00000000..90260367 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_HelperLibraries/VRLT_PoiMacrosAndDefines.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9d151ec0fb75338468f0890fd2186a97 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes.meta new file mode 100644 index 00000000..45e3e952 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c3a03bf90e1b3a4c88b48e32651311b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass.meta new file mode 100644 index 00000000..833dcb5e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 628a200e184972047810bb10469677de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset new file mode 100644 index 00000000..018a58dd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset @@ -0,0 +1,74 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassAdd + m_EditorClassIdentifier: + Id: PoiAddPass + Name: + Version: + Author: + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: febbce3298c3c0c4d992438299863f92, + type: 3} + Keywords: + - ADD_PASS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -3240189840891472907, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - PASS_TAGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2174316723555253114, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - BLEND_SETTINGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4540729029592200931, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3034014944662824268, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4546188019848176897, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - PASS_PROGRAMS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4255684877832018038, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - STENCIL + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3801199042521936713, guid: a9f4aa9c839a6de4baa470342ef2febc, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset.meta new file mode 100644 index 00000000..7d0f461d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLM_PoiPassAdd.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 59c561ebcc77ee641a7652c6d27885b9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection new file mode 100644 index 00000000..f512652d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection @@ -0,0 +1,41 @@ +#T#AddPassTags +Tags { "LightMode" = "ForwardAdd" } + +#T#AddPassStencil +#K#ADD_PASS_STENCIL + +#T#AddPassBlendSettings +ZWrite Off +Cull [_Cull] +AlphaToMask [_AlphaToCoverage] +ZTest [_ZTest] +ColorMask [_ColorMask] +Offset [_OffsetFactor], [_OffsetUnits] + +BlendOp [_BlendOp], [_BlendOpAlpha] +Blend One One + +#T#AddPassOnlyKeywords +#pragma multi_compile_fwdadd_fullshadows +#pragma multi_compile_instancing +#pragma multi_compile_fog +#define POI_PASS_ADD + +#T#AddPassKeywords +#K#ADD_PASS_KEYWORDS + +#T#AddPassPropertyVariables +#K#ADD_PROPERTY_VARIABLES + +#T#AddPassPrograms +#K#VERTEX_ADD_DATA_STRUCTURES +#K#VERTEX_ADD_FUNCTIONS_EARLY +#K#VERTEX_ADD_FUNCTIONS +#K#VERTEX_ADD_FUNCTIONS_LATE +#K#VERTEX_ADD_PROGRAM + +#K#FRAGMENT_ADD_DATA_STRUCTURES +#K#FRAGMENT_ADD_FUNCTIONS_EARLY +#K#FRAGMENT_ADD_FUNCTIONS +#K#FRAGMENT_ADD_FUNCTIONS_LATE +#K#FRAGMENT_ADD_PROGRAM \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection.meta new file mode 100644 index 00000000..85206e0d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLTC_PoiAddPass.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a9f4aa9c839a6de4baa470342ef2febc +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate new file mode 100644 index 00000000..2e7593e7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate @@ -0,0 +1,57 @@ +float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target +{ + UNITY_SETUP_INSTANCE_ID(i); + #K#FRAGMENT_ADD_DECLARATIONS + + #K#FRAGMENT_ADD_INIT_EARLY + #K#FRAGMENT_ADD_INIT + #K#FRAGMENT_ADD_INIT_LATE + + #K#FRAGMENT_ADD_COLOR_EARLY + #K#FRAGMENT_ADD_COLOR + #K#FRAGMENT_ADD_COLOR_LATE + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + #K#FRAGMENT_ADD_LIGHTING_EARLY + #K#FRAGMENT_ADD_LIGHTING + #K#FRAGMENT_ADD_LIGHTING_LATE + + #K#FRAGMENT_ADD_EMISSION_EARLY + #K#FRAGMENT_ADD_EMISSION + #K#FRAGMENT_ADD_EMISSION_LATE + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + #K#FRAGMENT_ADD_RETURN + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate.meta new file mode 100644 index 00000000..e6798a4c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_AddPass/VRLT_PoiFragmentProgramAdd.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 98f88e8f9adbcaf48833cccf89938bd1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass.meta new file mode 100644 index 00000000..2c5e9ac6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c6dab48a229034429efea05e73b3fec +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset new file mode 100644 index 00000000..cb097018 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset @@ -0,0 +1,74 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassBase + m_EditorClassIdentifier: + Id: PoiBasePass + Name: + Version: + Author: + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: febbce3298c3c0c4d992438299863f92, + type: 3} + Keywords: + - BASE_PASS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -6053046405847169070, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - PASS_TAGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7577037419789841379, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - BLEND_SETTINGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -419705168918072479, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6669721446743813057, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4948670061464602932, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - PASS_PROGRAMS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7906610651650995626, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - STENCIL + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -7705380083184054322, guid: a443bc3f20965fb42bde0d15c4200466, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset.meta new file mode 100644 index 00000000..391008c1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLM_PoiPassBase.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 66e5c71ed6c5bc049bab5e637f5e2d03 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection new file mode 100644 index 00000000..51043393 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection @@ -0,0 +1,43 @@ +#T#BasePassTags +Tags { "LightMode" = "ForwardBase" } + +#T#BasePassStencil +#K#BASE_PASS_STENCIL + +#T#BasePassBlendSettings +ZWrite [_ZWrite] +Cull [_Cull] +AlphaToMask [_AlphaToCoverage] +ZTest [_ZTest] +ColorMask [_ColorMask] +Offset [_OffsetFactor], [_OffsetUnits] + +BlendOp [_BlendOp], [_BlendOpAlpha] +Blend [_SrcBlend] [_DstBlend] + +#T#BasePassOnlyKeywords +#pragma shader_feature VERTEXLIGHT_ON +#pragma multi_compile_fwdbase +#pragma multi_compile_instancing +#pragma multi_compile_fog +#pragma multi_compile _ VERTEXLIGHT_ON +#define POI_PASS_BASE + +#T#BasePassKeywords +#K#BASE_PASS_KEYWORDS + +#T#BasePassPropertyVariables +#K#BASE_PROPERTY_VARIABLES + +#T#BasePassPrograms +#K#VERTEX_BASE_DATA_STRUCTURES +#K#VERTEX_BASE_FUNCTIONS_EARLY +#K#VERTEX_BASE_FUNCTIONS +#K#VERTEX_BASE_FUNCTIONS_LATE +#K#VERTEX_BASE_PROGRAM + +#K#FRAGMENT_BASE_DATA_STRUCTURES +#K#FRAGMENT_BASE_FUNCTIONS_EARLY +#K#FRAGMENT_BASE_FUNCTIONS +#K#FRAGMENT_BASE_FUNCTIONS_LATE +#K#FRAGMENT_BASE_PROGRAM \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection.meta new file mode 100644 index 00000000..b137db04 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLTC_PoiBasePass.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a443bc3f20965fb42bde0d15c4200466 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate new file mode 100644 index 00000000..cae80cb4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate @@ -0,0 +1,62 @@ +float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target +/* +#ifdef +, out float depth : SV_DEPTH +#endif +*/ +{ + UNITY_SETUP_INSTANCE_ID(i); + #K#FRAGMENT_BASE_DECLARATIONS + + #K#FRAGMENT_BASE_INIT_EARLY + #K#FRAGMENT_BASE_INIT + #K#FRAGMENT_BASE_INIT_LATE + + #K#FRAGMENT_BASE_COLOR_EARLY + #K#FRAGMENT_BASE_COLOR + #K#FRAGMENT_BASE_COLOR_LATE + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + #K#FRAGMENT_BASE_LIGHTING_EARLY + #K#FRAGMENT_BASE_LIGHTING + #K#FRAGMENT_BASE_LIGHTING_LATE + + #K#FRAGMENT_BASE_EMISSION_EARLY + #K#FRAGMENT_BASE_EMISSION + #K#FRAGMENT_BASE_EMISSION_LATE + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + #K#FRAGMENT_BASE_RETURN + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate.meta new file mode 100644 index 00000000..e5d58d37 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_BasePass/VRLT_PoiFragmentProgramBase.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f54d51f65e140634aa87249deef0018b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData.meta new file mode 100644 index 00000000..5065ebba --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6f01f15ca148b1440993f955c5f13abd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset new file mode 100644 index 00000000..a286a58a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset @@ -0,0 +1,60 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiFragmentInit + m_EditorClassIdentifier: + Id: PoiFragmentInit + Name: Fragment Init + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: 3935505571799511054, guid: 975c519675ca9e746987e60df4c3ed6f, + type: 3} + Keywords: + - VERTEX_BASE_DATA_STRUCTURES + - VERTEX_ADD_DATA_STRUCTURES + - VERTEX_SHADOW_DATA_STRUCTURES + - VERTEX_OUTLINE_DATA_STRUCTURES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1723996796289867528, guid: 975c519675ca9e746987e60df4c3ed6f, + type: 3} + Keywords: + - FRAGMENT_BASE_DECLARATIONS + - FRAGMENT_ADD_DECLARATIONS + - FRAGMENT_SHADOW_DECLARATIONS + - FRAGMENT_OUTLINE_DECLARATIONS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 4773108581884339280, guid: 975c519675ca9e746987e60df4c3ed6f, + type: 3} + Keywords: + - FRAGMENT_BASE_INIT + - FRAGMENT_ADD_INIT + - FRAGMENT_SHADOW_INIT + - FRAGMENT_OUTLINE_INIT + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset.meta new file mode 100644 index 00000000..b7cd9a99 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLM_PoiFragmentInit.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb7c90cddc3d52e458018ea6af8844a7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection new file mode 100644 index 00000000..a173b53d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection @@ -0,0 +1,202 @@ +#T#PoiFragDataVariables +struct PoiMesh +{ + #K#POI_MESH_PROPERTIES + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; +}; + +struct PoiCam +{ + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + #K#POI_CAM_PROPERTIES +}; + +struct PoiMods +{ + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; +}; + +struct PoiLight +{ + #K#POI_LIGHT_PROPERTIES + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + #K#POI_LIGHT_PROPERTIES +}; + +struct PoiVertexLights +{ + #K#POI_VERTEX_LIGHTS_PROPERTIES + float3 direction; + float3 color; + float attenuation; +}; + +struct PoiFragData +{ + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; +}; + +#T#PoiFragDataDeclerations + +PoiMesh poiMesh; +PoiInitStruct(PoiMesh, poiMesh); + +PoiLight poiLight; +PoiInitStruct(PoiLight, poiLight); + +PoiVertexLights poiVertexLights; +PoiInitStruct(PoiVertexLights, poiVertexLights); + +PoiCam poiCam; +PoiInitStruct(PoiCam, poiCam); + +PoiMods poiMods; +PoiInitStruct(PoiMods, poiMods); + +PoiFragData poiFragData; +poiFragData.emission = 0; +poiFragData.baseColor = float3(0, 0, 0); +poiFragData.finalColor = float3(0, 0, 0); +poiFragData.alpha = 1; + +#T#PoiFragDataImplementation +// Mesh Data +poiMesh.objectPosition = i.objectPos; +poiMesh.objNormal = i.objNormal; +poiMesh.normals[0] = i.normal; +poiMesh.tangent = i.tangent; +poiMesh.binormal = i.binormal; +poiMesh.worldPos = i.worldPos.xyz; +poiMesh.localPos = i.localPos.xyz; +poiMesh.vertexColor = i.vertexColor; +poiMesh.isFrontFace = facing; + +#ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } +#endif + +poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); +float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); +float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); +float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); +float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; +poiCam.tangentViewDir = normalize(ase_tanViewDir); + +// 0-3 UV0-UV3 +// 4 Panosphere UV +// 5 world pos xz +// 6 Polar UV +// 6 Distorted UV +#if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; +#endif +poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); +poiMesh.uv[0] = i.uv[0]; +poiMesh.uv[1] = i.uv[1]; +poiMesh.uv[2] = i.uv[2]; +poiMesh.uv[3] = i.uv[3]; +poiMesh.uv[4] = poiMesh.uv[0]; +poiMesh.uv[5] = poiMesh.worldPos.xz; +poiMesh.uv[6] = poiMesh.uv[0]; +poiMesh.uv[7] = poiMesh.uv[0]; + +#K#MESH_DATA_INIT + +float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + +#K#FRAGMENT_NORMAL_CALCULATIION + +// Camera data +poiCam.forwardDir = getCameraForward(); +poiCam.worldPos = _WorldSpaceCameraPos; +poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); +//poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); +poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); +poiCam.grabPos = i.grabPos; +poiCam.screenUV = calcScreenUVs(i.grabPos); +poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); +poiCam.clipPos = i.pos; +poiCam.worldDirection = i.worldDirection; +#K#CAMERA_DATA_INIT \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection.meta new file mode 100644 index 00000000..2e6209bf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_FragData/VRLTC_PoiFragmentData.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 975c519675ca9e746987e60df4c3ed6f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass.meta new file mode 100644 index 00000000..60a33de1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a26f7f588768bda46933b190e1e29586 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset new file mode 100644 index 00000000..d40ceede --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset @@ -0,0 +1,39 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassGrabPass + m_EditorClassIdentifier: + Id: PoiPassGrabPass + Name: PoiPassGrabPass + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: 7f77f9b053f16ea488a212151244cc24, + type: 3} + Keywords: + - GRAB_PASS + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset.meta new file mode 100644 index 00000000..5307205d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLM_PoiPassGrabPass.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 116970539aec41b4fba9ef90ce6ba5f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate new file mode 100644 index 00000000..c67851eb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate @@ -0,0 +1,5 @@ +//EnableGrabpass +GrabPass +{ + "_PoiGrab2" +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate.meta new file mode 100644 index 00000000..62f097f5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_GrabPass/VRLT_PoiGrabPass.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7f77f9b053f16ea488a212151244cc24 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass.meta new file mode 100644 index 00000000..fc8dba90 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 570b4d4c9fa5e95479facc2e94547938 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset new file mode 100644 index 00000000..c90097cc --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset @@ -0,0 +1,74 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassOutline + m_EditorClassIdentifier: + Id: PoiPassOutline + Name: + Version: + Author: + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: febbce3298c3c0c4d992438299863f92, + type: 3} + Keywords: + - OUTLINE_PASS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5460544465576130903, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_TAGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5537174700405361558, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - BLEND_SETTINGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4693249131991614365, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2948603614921953856, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6962958329821255724, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_PROGRAMS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4214999151408658396, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - STENCIL + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2027026212328545675, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset.meta new file mode 100644 index 00000000..c84e3b16 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3b8dccda61c2d524284df1a3dc84ed47 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset new file mode 100644 index 00000000..487fb408 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassOutlineEarly + m_EditorClassIdentifier: + Id: PoiPassOutline + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: febbce3298c3c0c4d992438299863f92, + type: 3} + Keywords: + - EARLY_OUTLINE_PASS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5460544465576130903, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_TAGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5537174700405361558, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - BLEND_SETTINGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4693249131991614365, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2948603614921953856, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6962958329821255724, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - PASS_PROGRAMS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -4214999151408658396, guid: 73a86ad89b001944fb681707661c44ca, + type: 3} + Keywords: + - STENCIL + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset.meta new file mode 100644 index 00000000..7bef2856 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLM_PoiPassOutlineEarly.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3dc633d34ec0e1848a06891c014e408b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection new file mode 100644 index 00000000..74278149 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection @@ -0,0 +1,55 @@ +#T#OutlinePassTags +Tags { "LightMode" = "ForwardBase" } + +#T#OutlinePassStencil +Stencil +{ + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilCompareFunction] + Pass [_OutlineStencilPassOp] + Fail [_OutlineStencilFailOp] + ZFail [_OutlineStencilZFailOp] +} + +#T#OutlinePassBlendSettings +/* +ColorMask [_ColorMask] +Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] +BlendOp [_BlendOp], [_BlendOpAlpha] +Blend [_SrcBlend] [_DstBlend] +ZWrite [_ZWrite] +AlphaToMask [_AlphaToCoverage] +Cull [_OutlineCull] +*/ +ZTest [_OutlineZTest] +Cull [_OutlineCull] +Blend SrcAlpha OneMinusSrcAlpha + +#T#OutlinePassOnlyKeywords +#pragma shader_feature VERTEXLIGHT_ON +#pragma multi_compile_fwdbase +#pragma multi_compile_instancing +#pragma multi_compile_fog +#pragma multi_compile _ VERTEXLIGHT_ON +#define POI_PASS_OUTLINE + +#T#OutlinePassKeywords +#K#OUTLINE_PASS_KEYWORDS + +#T#OutlinePassPropertyVariables +#K#OUTLINE_PROPERTY_VARIABLES + +#T#OutlinePassPrograms +#K#VERTEX_OUTLINE_DATA_STRUCTURES +#K#VERTEX_OUTLINE_FUNCTIONS_EARLY +#K#VERTEX_OUTLINE_FUNCTIONS +#K#VERTEX_OUTLINE_FUNCTIONS_LATE +#K#VERTEX_OUTLINE_PROGRAM + +#K#FRAGMENT_OUTLINE_DATA_STRUCTURES +#K#FRAGMENT_OUTLINE_FUNCTIONS_EARLY +#K#FRAGMENT_OUTLINE_FUNCTIONS +#K#FRAGMENT_OUTLINE_FUNCTIONS_LATE +#K#FRAGMENT_OUTLINE_PROGRAM diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection.meta new file mode 100644 index 00000000..6aa9c872 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLTC_PoiOutlinePass.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 73a86ad89b001944fb681707661c44ca +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate new file mode 100644 index 00000000..455bf7a4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate @@ -0,0 +1,57 @@ +float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target +{ + UNITY_SETUP_INSTANCE_ID(i); + #K#FRAGMENT_OUTLINE_DECLARATIONS + + #K#FRAGMENT_OUTLINE_INIT_EARLY + #K#FRAGMENT_OUTLINE_INIT + #K#FRAGMENT_OUTLINE_INIT_LATE + + #K#FRAGMENT_OUTLINE_COLOR_EARLY + #K#FRAGMENT_OUTLINE_COLOR + #K#FRAGMENT_OUTLINE_COLOR_LATE + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + #K#FRAGMENT_OUTLINE_LIGHTING_EARLY + #K#FRAGMENT_OUTLINE_LIGHTING + #K#FRAGMENT_OUTLINE_LIGHTING_LATE + + #K#FRAGMENT_OUTLINE_EMISSION_EARLY + #K#FRAGMENT_OUTLINE_EMISSION + #K#FRAGMENT_OUTLINE_EMISSION_LATE + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + #K#FRAGMENT_OUTLINE_RETURN + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate.meta new file mode 100644 index 00000000..fabca0c5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_OutlinePass/VRLT_PoiFragmentProgramOutline.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 76ec1741da6f1084b969474e2ba3873f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass.meta new file mode 100644 index 00000000..3a5730ad --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c23e230cc88f8d94db1ce5508f01a0b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset new file mode 100644 index 00000000..50ff7acf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiPassShadow + m_EditorClassIdentifier: + Id: PoiShadowPass + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: febbce3298c3c0c4d992438299863f92, + type: 3} + Keywords: + - SHADOW_PASS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 6116132723928259032, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - PASS_TAGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1036405390127914732, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - BLEND_SETTINGS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1619541393495208201, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - PASS_ONLY_SHADER_KEYWORDS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -9124431215020797166, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -5626686756405220246, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - PASS_PROGRAMS + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -796571026530097982, guid: 1850680e37d251e4d96b0c8211901345, + type: 3} + Keywords: + - STENCIL + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset.meta new file mode 100644 index 00000000..21796bc7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLM_PoiPassShadow.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ca7dd01d6e441646b7d85807a433978 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection new file mode 100644 index 00000000..d851445e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection @@ -0,0 +1,41 @@ +#T#ShadowPassTags +Tags { "LightMode" = "ShadowCaster" } + +#T#ShadowPassStencil +#K#SHADOW_PASS_STENCIL + +#T#ShadowPassBlendSettings +ZWrite [_ZWrite] +Cull [_Cull] +AlphaToMask Off +ZTest [_ZTest] +ColorMask [_ColorMask] +Offset [_OffsetFactor], [_OffsetUnits] + +BlendOp [_BlendOp], [_BlendOpAlpha] +Blend [_SrcBlend] [_DstBlend] + +#T#ShadowPassOnlyKeywords +#pragma multi_compile_instancing +#pragma multi_compile_shadowcaster +#pragma multi_compile_fog +#define POI_PASS_SHADOW + +#T#ShadowPassKeywords +#K#SHADOW_PASS_KEYWORDS + +#T#ShadowPassPropertyVariables +#K#SHADOW_PROPERTY_VARIABLES + +#T#ShadowPassPrograms +#K#VERTEX_SHADOW_DATA_STRUCTURES +#K#VERTEX_SHADOW_FUNCTIONS_EARLY +#K#VERTEX_SHADOW_FUNCTIONS +#K#VERTEX_SHADOW_FUNCTIONS_LATE +#K#VERTEX_SHADOW_PROGRAM + +#K#FRAGMENT_SHADOW_DATA_STRUCTURES +#K#FRAGMENT_SHADOW_FUNCTIONS_EARLY +#K#FRAGMENT_SHADOW_FUNCTIONS +#K#FRAGMENT_SHADOW_FUNCTIONS_LATE +#K#FRAGMENT_SHADOW_PROGRAM \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection.meta new file mode 100644 index 00000000..955e69f1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLTC_PoiShadowPass.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1850680e37d251e4d96b0c8211901345 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate new file mode 100644 index 00000000..eaac8ccc --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate @@ -0,0 +1,54 @@ +float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target +{ + #K#FRAGMENT_SHADOW_FIRSTLINE + + UNITY_SETUP_INSTANCE_ID(i); + #K#FRAGMENT_SHADOW_DECLARATIONS + + #K#FRAGMENT_SHADOW_INIT_EARLY + #K#FRAGMENT_SHADOW_INIT + #K#FRAGMENT_SHADOW_INIT_LATE + + #K#FRAGMENT_SHADOW_COLOR_EARLY + #K#FRAGMENT_SHADOW_COLOR + #K#FRAGMENT_SHADOW_COLOR_LATE + + poiFragData.finalColor = poiFragData.baseColor; + + #K#FRAGMENT_SHADOW_LIGHTING_EARLY + #K#FRAGMENT_SHADOW_LIGHTING + #K#FRAGMENT_SHADOW_LIGHTING_LATE + + #K#FRAGMENT_SHADOW_EMISSION_EARLY + #K#FRAGMENT_SHADOW_EMISSION + #K#FRAGMENT_SHADOW_EMISSION_LATE + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + #K#FRAGMENT_SHADOW_RETURN + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate.meta new file mode 100644 index 00000000..17b0948c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/Poi_ShadowPass/VRLT_PoiFragmentProgramShadow.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8f322479ea35535428018ca139f41ff9 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset new file mode 100644 index 00000000..4bcfc085 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_PoiVertFragSkeleton + m_EditorClassIdentifier: + Id: PoiTempPasses + Name: Temp Passes + Version: 1.0 + Author: Poiyomi + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: c093efc96b83cb942adcf2248540ca07, + type: 3} + Keywords: + - INCLUDES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: c376257a9fe5e97478a8021600eceb25, + type: 3} + Keywords: + - VERTEX_BASE_PROGRAM + - VERTEX_ADD_PROGRAM + - VERTEX_SHADOW_PROGRAM + - VERTEX_OUTLINE_PROGRAM + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: f54d51f65e140634aa87249deef0018b, + type: 3} + Keywords: + - FRAGMENT_BASE_PROGRAM + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: 98f88e8f9adbcaf48833cccf89938bd1, + type: 3} + Keywords: + - FRAGMENT_ADD_PROGRAM + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: 8f322479ea35535428018ca139f41ff9, + type: 3} + Keywords: + - FRAGMENT_SHADOW_PROGRAM + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -544282384758852595, guid: 76ec1741da6f1084b969474e2ba3873f, + type: 3} + Keywords: + - FRAGMENT_OUTLINE_PROGRAM + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset.meta new file mode 100644 index 00000000..b4bc1f0a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLM_PoiVertFragSkeleton.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09d6c45f314e36940b6ac7d42852b9ea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate new file mode 100644 index 00000000..e0b452f1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate @@ -0,0 +1,39 @@ +Pass +{ + #KI#PASS_TAGS + + #KI#STENCIL + + #KI#BLEND_SETTINGS + + CGPROGRAM + + #pragma target 5.0 + + #K#REQUIREMENTS + + #K#SHADER_KEYWORDS + #KI#PASS_ONLY_SHADER_KEYWORDS + + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #K#MACROS_AND_DEFINES + + #KI#PROPERTY_VARIABLES + + #KI#PASS_ONLY_INCLUDES + #K#INCLUDES + + #KI#PASS_PROGRAMS + + ENDCG + +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate.meta new file mode 100644 index 00000000..47f5fd26 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiGenericPass.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: febbce3298c3c0c4d992438299863f92 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate new file mode 100644 index 00000000..ab76557a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate @@ -0,0 +1,35 @@ +//Structs +struct appdata +{ + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct v2f +{ + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate.meta new file mode 100644 index 00000000..eb702093 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiInterpolators.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c093efc96b83cb942adcf2248540ca07 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate new file mode 100644 index 00000000..65d5a5b9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate @@ -0,0 +1,83 @@ +v2f vert(appdata v) +{ + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #K#VERTEX_INPUT_MODS + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #K#VERTEX_MODS_EARLY + #K#VERTEX_MODS + #K#VERTEX_MODS_LATE + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + #K#VERTEX_MODS_PENETRATION + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate.meta new file mode 100644 index 00000000..249557f5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_Passes/VRLT_PoiVertexProgram.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c376257a9fe5e97478a8021600eceb25 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets.meta new file mode 100644 index 00000000..80ad3b77 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c617480c3d369bf4fa6f2ee52b2e8a22 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset new file mode 100644 index 00000000..f6d348a6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset @@ -0,0 +1,48 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_RenderPresetsPro + m_EditorClassIdentifier: + Id: RenderPresetsPro + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -6420586271822873294, guid: 1dd8665fccdb73a4883771ca4f5b6367, + type: 3} + Keywords: + - TOP_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7636714996591849511, guid: 1dd8665fccdb73a4883771ca4f5b6367, + type: 3} + Keywords: + - BASE_PROPERTY_VARIABLES + - ADD_PROPERTY_VARIABLES + - SHADOW_PROPERTY_VARIABLES + - OUTLINE_PROPERTY_VARIABLES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset.meta new file mode 100644 index 00000000..b03f57c5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLM_RenderPresetsPro.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 960307fac71087b4da10b4dc423d4e3a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection new file mode 100644 index 00000000..a42a9c95 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection @@ -0,0 +1,14 @@ +#T#PoiRenderPresetProperties +[ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} +}]}]}", Int) = 0 +#T#PoiRenderPresetVariables +float _Mode; \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection.meta new file mode 100644 index 00000000..4c175470 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_RenderPresets/VRLTC_PoiRenderPreset.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1dd8665fccdb73a4883771ca4f5b6367 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater.meta new file mode 100644 index 00000000..65afa6ed --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75d9cc03b2312ac4b9e42cff3d263fa5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset new file mode 100644 index 00000000..339e1a95 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_UIBoilerPlate + m_EditorClassIdentifier: + Id: UIBoilerPlate + Name: + Version: + Author: + Description: + EnableProperties: [] + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: d92b17ab89beff64fa1b112405eac110, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1126301513621564112, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1760774314392892198, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7186489797681024674, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1823955708936180714, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7221052497735660734, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -2144583304199416996, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5232395528088337387, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1878476789853068956, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset.meta new file mode 100644 index 00000000..231600a8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlate.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fb5d93d50bc5c03498f9832d8bcb7074 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset new file mode 100644 index 00000000..b5f6aa15 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_UIBoilerPlateGrabPass + m_EditorClassIdentifier: + Id: UIBoilerPlateGrabPass + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: d92b17ab89beff64fa1b112405eac110, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1126301513621564112, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1760774314392892198, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7186489797681024674, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1823955708936180714, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 3851405518941286267, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7221052497735660734, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5232395528088337387, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1878476789853068956, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset.meta new file mode 100644 index 00000000..43446e20 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateGrabPass.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6bcededc07248644e8ef373a48e0e68b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset new file mode 100644 index 00000000..243dc48b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1039f25740a92fc4292bb1d94d07ad19, type: 3} + m_Name: VRLM_UIBoilerPlateOutline + m_EditorClassIdentifier: + Id: UIBoilerPlateOutline + Name: + Version: + Author: + Description: + Enabled: + Name: + DisplayName: + Type: + DefaultValue: + DefaultTextureAsset: {fileID: 0} + Attributes: [] + EnableValue: 0 + Properties: [] + ModuleDependencies: [] + IncompatibleWith: [] + Templates: + - Template: {fileID: -544282384758852595, guid: d92b17ab89beff64fa1b112405eac110, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1126301513621564112, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1760774314392892198, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: -1591444715006847334, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7186489797681024674, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1823955708936180714, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 7221052497735660734, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 5232395528088337387, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + - Template: {fileID: 1878476789853068956, guid: 3ac1b37527ecb8d4eaea13e5f38d042d, + type: 3} + Keywords: + - SHADER_PROPERTIES + NeedsVariant: 0 + Queue: 100 + Functions: [] + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset.meta new file mode 100644 index 00000000..6b232064 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLM_UIBoilerPlateOutline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5c55e6478a8b134191cee04692210ff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection new file mode 100644 index 00000000..2d31d891 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection @@ -0,0 +1,48 @@ +#T#MAIN_PROPERTIES +// Main +[HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 +#K#MAIN_PROPERTIES + +#T#OUTLINE_PROPERTIES +// Outlines +[HideInInspector] m_OutlineCategory (" Outlines--{reference_property:_EnableOutlines}", Float) = 0 +#K#OUTLINE_PROPERTIES + +#T#LIGHTING_PROPERTIES +// Lighting +[HideInInspector] m_lightingCategory ("Shading", Float) = 0 +#K#LIGHTING_PROPERTIES + +#T#SPECIALFX_PROPERTIES +// Rendering Options +[HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 +#K#SPECIALFX_PROPERTIES + +#T#GRABPASS_PROPERTIES +// Rendering Options +[HideInInspector] m_grabPassCategory ("Grab Pass", Float) = 0 +#K#GRABPASS_PROPERTIES + +#T#MODIFIER_PROPERTIES +// Rendering Options +[HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 +#K#MODIFIER_PROPERTIES + +#T#EXTRAS_PROPERTIES +// Poi Extras +#K#EXTRAS_PROPERTIES + +#T#THIRDPARTY_PROPERTIES +//Third party +[HideInInspector] m_thirdpartyCategory ("Third Party", Float) = 0 +#K#THIRDPARTY_PROPERTIES + +#T#POSTPROCESSING_PROPERTIES +// Rendering Options +[HideInInspector] m_postprocessing ("Post Processing", Float) = 0 +#K#POSTPROCESSING_PROPERTIES + +#T#RENDERING_PROPERTIES +// Rendering Options +[HideInInspector] m_renderingCategory ("Rendering", Float) = 0 +#K#RENDERING_PROPERTIES \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection.meta new file mode 100644 index 00000000..9cdb087f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLTC_PoiPropertySkeleton.poiTemplateCollection.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3ac1b37527ecb8d4eaea13e5f38d042d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {instanceID: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate new file mode 100644 index 00000000..9daf4644 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate @@ -0,0 +1,14 @@ +[HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 +[HideInInspector] shader_is_using_thry_editor ("", Float) = 0 +[HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 +[HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 +[HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 +[HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 +[HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + +// Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. +[HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 +[ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 +[Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + +#K#TOP_PROPERTIES \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate.meta new file mode 100644 index 00000000..6b40b4e4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/Poi_UIBoilerPlater/VRLT_PropsUIBoilerPlate.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d92b17ab89beff64fa1b112405eac110 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset new file mode 100644 index 00000000..fcc66a8d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset @@ -0,0 +1,85 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8aa43eb5c662824699f2379805fb2c0, type: 3} + m_Name: PoiyomiPro + m_EditorClassIdentifier: + Id: PoiyomiPro + Name: Poiyomi Pro + Version: 1.0 + Author: Poiyomi + Description: + UseTemplatesForProperties: 1 + ShaderPropertiesTemplate: {fileID: 0} + ShaderPath: .poiyomi/V8.0/Pro + ShaderTemplate: {fileID: -544282384758852595, guid: 86b30dc8b6cc0114bbe585ac21b04e85, + type: 3} + CustomEditor: Thry.ShaderEditor + Properties: + - Name: shader_master_label + DisplayName: Poiyomi Pro V8a + Type: Float + DefaultValue: 0 + DefaultTextureAsset: {fileID: 0} + Attributes: [] + BaseModules: + - {fileID: 11400000, guid: fb5d93d50bc5c03498f9832d8bcb7074, type: 2} + - {fileID: 11400000, guid: 66e5c71ed6c5bc049bab5e637f5e2d03, type: 2} + - {fileID: 11400000, guid: 59c561ebcc77ee641a7652c6d27885b9, type: 2} + - {fileID: 11400000, guid: 4ca7dd01d6e441646b7d85807a433978, type: 2} + - {fileID: 11400000, guid: 960307fac71087b4da10b4dc423d4e3a, type: 2} + - {fileID: 11400000, guid: 09d6c45f314e36940b6ac7d42852b9ea, type: 2} + - {fileID: 11400000, guid: cda6385aa13bbb847b8e00f80b822a55, type: 2} + - {fileID: 11400000, guid: eb7c90cddc3d52e458018ea6af8844a7, type: 2} + - {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2} + - {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2} + - {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2} + - {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2} + - {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2} + - {fileID: 11400000, guid: c4ea6b952ecdc0c40b07a6cc27e2ed67, type: 2} + - {fileID: 11400000, guid: d579766a4789fda4cb17f70f66ba2087, type: 2} + - {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2} + - {fileID: 11400000, guid: e1ac0430d20d06645af4f4e9f7ef5a68, type: 2} + - {fileID: 11400000, guid: 691861f6a28e64048b4d465b44e7dae2, type: 2} + - {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2} + - {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2} + - {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2} + - {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2} + - {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2} + - {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2} + - {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2} + - {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2} + - {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2} + - {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2} + - {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2} + - {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2} + - {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2} + - {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2} + - {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2} + - {fileID: 11400000, guid: 711889a3cc0512d4fb46afae76e537ed, type: 2} + - {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2} + - {fileID: 11400000, guid: dc41f153d2e0ddd499b073cb3759a161, type: 2} + - {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2} + - {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2} + - {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2} + - {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2} + - {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2} + - {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2} + - {fileID: 11400000, guid: 716171a7172b1ef499b84a4882ebfc61, type: 2} + - {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2} + - {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2} + - {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2} + - {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2} + AdditionalModules: [] + LockBaseModules: 0 + LastGeneratedShaders: + - {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset.meta new file mode 100644 index 00000000..d2f32c4d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiPro.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 211139d603d02ef4fab2ef3c3af04baa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset new file mode 100644 index 00000000..4874ad89 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8aa43eb5c662824699f2379805fb2c0, type: 3} + m_Name: PoiyomiProGrabPass + m_EditorClassIdentifier: + Id: PoiyomiProGrabPass + Name: Poiyomi Pro Grab Pass + Version: 1.0 + Author: Poiyomi + Description: + UseTemplatesForProperties: 1 + ShaderPropertiesTemplate: {fileID: 0} + ShaderPath: .poiyomi/V8.0/Pro Grab Pass + ShaderTemplate: {fileID: -544282384758852595, guid: 86b30dc8b6cc0114bbe585ac21b04e85, + type: 3} + CustomEditor: Thry.ShaderEditor + Properties: + - Name: shader_master_label + DisplayName: Poiyomi Pro V8a + Type: Float + DefaultValue: 0 + DefaultTextureAsset: {fileID: 0} + Attributes: [] + BaseModules: + - {fileID: 11400000, guid: 6bcededc07248644e8ef373a48e0e68b, type: 2} + - {fileID: 11400000, guid: 116970539aec41b4fba9ef90ce6ba5f7, type: 2} + - {fileID: 11400000, guid: 66e5c71ed6c5bc049bab5e637f5e2d03, type: 2} + - {fileID: 11400000, guid: 59c561ebcc77ee641a7652c6d27885b9, type: 2} + - {fileID: 11400000, guid: 4ca7dd01d6e441646b7d85807a433978, type: 2} + - {fileID: 11400000, guid: 960307fac71087b4da10b4dc423d4e3a, type: 2} + - {fileID: 11400000, guid: 09d6c45f314e36940b6ac7d42852b9ea, type: 2} + - {fileID: 11400000, guid: cda6385aa13bbb847b8e00f80b822a55, type: 2} + - {fileID: 11400000, guid: eb7c90cddc3d52e458018ea6af8844a7, type: 2} + - {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2} + - {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2} + - {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2} + - {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2} + - {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2} + - {fileID: 11400000, guid: c4ea6b952ecdc0c40b07a6cc27e2ed67, type: 2} + - {fileID: 11400000, guid: d579766a4789fda4cb17f70f66ba2087, type: 2} + - {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2} + - {fileID: 11400000, guid: e1ac0430d20d06645af4f4e9f7ef5a68, type: 2} + - {fileID: 11400000, guid: 691861f6a28e64048b4d465b44e7dae2, type: 2} + - {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2} + - {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2} + - {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2} + - {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2} + - {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2} + - {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2} + - {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2} + - {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2} + - {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2} + - {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2} + - {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2} + - {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2} + - {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2} + - {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2} + - {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2} + - {fileID: 11400000, guid: a5119f130ff4a2b41bdebe9457caceb3, type: 2} + - {fileID: 11400000, guid: 711889a3cc0512d4fb46afae76e537ed, type: 2} + - {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2} + - {fileID: 11400000, guid: dc41f153d2e0ddd499b073cb3759a161, type: 2} + - {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2} + - {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2} + - {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2} + - {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2} + - {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2} + - {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2} + - {fileID: 11400000, guid: 716171a7172b1ef499b84a4882ebfc61, type: 2} + - {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2} + - {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2} + - {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2} + - {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2} + AdditionalModules: [] + LockBaseModules: 0 + LastGeneratedShaders: + - {fileID: 4800000, guid: 2260509a8003e9b4bafc112ed2fb6cf9, type: 3} + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset.meta new file mode 100644 index 00000000..3e0b3082 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProGrabPass.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 253ddbd0b25adae43a1dc1c0a0b43e1d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset new file mode 100644 index 00000000..f9198838 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8aa43eb5c662824699f2379805fb2c0, type: 3} + m_Name: PoiyomiProOutline + m_EditorClassIdentifier: + Id: PoiyomiProOutline + Name: Poiyomi Pro Outline + Version: 1.0 + Author: Poiyomi + Description: + UseTemplatesForProperties: 1 + ShaderPropertiesTemplate: {fileID: 0} + ShaderPath: .poiyomi/V8.0/Pro Outline + ShaderTemplate: {fileID: -544282384758852595, guid: 86b30dc8b6cc0114bbe585ac21b04e85, + type: 3} + CustomEditor: Thry.ShaderEditor + Properties: + - Name: shader_master_label + DisplayName: Poiyomi Pro V8a + Type: Float + DefaultValue: 0 + DefaultTextureAsset: {fileID: 0} + Attributes: [] + BaseModules: + - {fileID: 11400000, guid: b5c55e6478a8b134191cee04692210ff, type: 2} + - {fileID: 11400000, guid: 66e5c71ed6c5bc049bab5e637f5e2d03, type: 2} + - {fileID: 11400000, guid: 3b8dccda61c2d524284df1a3dc84ed47, type: 2} + - {fileID: 11400000, guid: 59c561ebcc77ee641a7652c6d27885b9, type: 2} + - {fileID: 11400000, guid: 4ca7dd01d6e441646b7d85807a433978, type: 2} + - {fileID: 11400000, guid: 960307fac71087b4da10b4dc423d4e3a, type: 2} + - {fileID: 11400000, guid: 09d6c45f314e36940b6ac7d42852b9ea, type: 2} + - {fileID: 11400000, guid: cda6385aa13bbb847b8e00f80b822a55, type: 2} + - {fileID: 11400000, guid: eb7c90cddc3d52e458018ea6af8844a7, type: 2} + - {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2} + - {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2} + - {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2} + - {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2} + - {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2} + - {fileID: 11400000, guid: c4ea6b952ecdc0c40b07a6cc27e2ed67, type: 2} + - {fileID: 11400000, guid: d579766a4789fda4cb17f70f66ba2087, type: 2} + - {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2} + - {fileID: 11400000, guid: e1ac0430d20d06645af4f4e9f7ef5a68, type: 2} + - {fileID: 11400000, guid: 691861f6a28e64048b4d465b44e7dae2, type: 2} + - {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2} + - {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2} + - {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2} + - {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2} + - {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2} + - {fileID: 11400000, guid: a500e18ef22aa3f438fb7f1a4b34ac5f, type: 2} + - {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2} + - {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2} + - {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2} + - {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2} + - {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2} + - {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2} + - {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2} + - {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2} + - {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2} + - {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2} + - {fileID: 11400000, guid: 711889a3cc0512d4fb46afae76e537ed, type: 2} + - {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2} + - {fileID: 11400000, guid: dc41f153d2e0ddd499b073cb3759a161, type: 2} + - {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2} + - {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2} + - {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2} + - {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2} + - {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2} + - {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2} + - {fileID: 11400000, guid: 716171a7172b1ef499b84a4882ebfc61, type: 2} + - {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2} + - {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2} + - {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2} + - {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2} + AdditionalModules: [] + LockBaseModules: 0 + LastGeneratedShaders: + - {fileID: 4800000, guid: 9cdbe9241ea4aaa48944028272700834, type: 3} + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset.meta new file mode 100644 index 00000000..1a970a44 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b97cf772dab1d7042b588a66bc2a184a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset new file mode 100644 index 00000000..cb014222 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8aa43eb5c662824699f2379805fb2c0, type: 3} + m_Name: PoiyomiProOutlineEarly + m_EditorClassIdentifier: + Id: PoiyomiProEarlyOutline + Name: Poiyomi Pro Early Outline + Version: 1.0 + Author: Poiyomi + Description: + UseTemplatesForProperties: 1 + ShaderPropertiesTemplate: {fileID: 0} + ShaderPath: .poiyomi/V8.0/Pro Outline Early + ShaderTemplate: {fileID: -544282384758852595, guid: 86b30dc8b6cc0114bbe585ac21b04e85, + type: 3} + CustomEditor: Thry.ShaderEditor + Properties: + - Name: shader_master_label + DisplayName: Poiyomi Pro V8a + Type: Float + DefaultValue: 0 + DefaultTextureAsset: {fileID: 0} + Attributes: [] + BaseModules: + - {fileID: 11400000, guid: b5c55e6478a8b134191cee04692210ff, type: 2} + - {fileID: 11400000, guid: 3dc633d34ec0e1848a06891c014e408b, type: 2} + - {fileID: 11400000, guid: 66e5c71ed6c5bc049bab5e637f5e2d03, type: 2} + - {fileID: 11400000, guid: 59c561ebcc77ee641a7652c6d27885b9, type: 2} + - {fileID: 11400000, guid: 4ca7dd01d6e441646b7d85807a433978, type: 2} + - {fileID: 11400000, guid: 960307fac71087b4da10b4dc423d4e3a, type: 2} + - {fileID: 11400000, guid: 09d6c45f314e36940b6ac7d42852b9ea, type: 2} + - {fileID: 11400000, guid: cda6385aa13bbb847b8e00f80b822a55, type: 2} + - {fileID: 11400000, guid: eb7c90cddc3d52e458018ea6af8844a7, type: 2} + - {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2} + - {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2} + - {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2} + - {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2} + - {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2} + - {fileID: 11400000, guid: c4ea6b952ecdc0c40b07a6cc27e2ed67, type: 2} + - {fileID: 11400000, guid: d579766a4789fda4cb17f70f66ba2087, type: 2} + - {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2} + - {fileID: 11400000, guid: e1ac0430d20d06645af4f4e9f7ef5a68, type: 2} + - {fileID: 11400000, guid: 691861f6a28e64048b4d465b44e7dae2, type: 2} + - {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2} + - {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2} + - {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2} + - {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2} + - {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2} + - {fileID: 11400000, guid: a500e18ef22aa3f438fb7f1a4b34ac5f, type: 2} + - {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2} + - {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2} + - {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2} + - {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2} + - {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2} + - {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2} + - {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2} + - {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2} + - {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2} + - {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2} + - {fileID: 11400000, guid: 711889a3cc0512d4fb46afae76e537ed, type: 2} + - {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2} + - {fileID: 11400000, guid: dc41f153d2e0ddd499b073cb3759a161, type: 2} + - {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2} + - {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2} + - {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2} + - {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2} + - {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2} + - {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2} + - {fileID: 11400000, guid: 716171a7172b1ef499b84a4882ebfc61, type: 2} + - {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2} + - {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2} + - {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2} + - {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2} + AdditionalModules: [] + LockBaseModules: 0 + LastGeneratedShaders: + - {fileID: 4800000, guid: 1513582543e8f6c44b1981e8689f7a52, type: 3} + AdditionalSerializedData: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset.meta new file mode 100644 index 00000000..9bbea01f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/PoiyomiProOutlineEarly.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 570a791f76635cc4991c61643d25d0e6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate new file mode 100644 index 00000000..b461f10d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate @@ -0,0 +1,17 @@ +Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + +#K#GRAB_PASS + +#K#EARLY_Z_PASS + +#K#EARLY_OUTLINE_PASS + +#K#BASE_PASS + +#K#OUTLINE_PASS + +#K#ADD_PASS + +#K#SHADOW_PASS + +#K#META_PASS diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate.meta new file mode 100644 index 00000000..1d9dedd8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiBaseTemplate.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 86b30dc8b6cc0114bbe585ac21b04e85 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate new file mode 100644 index 00000000..e69de29b diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate.meta new file mode 100644 index 00000000..aa0c31cd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Editor/VRLT_PoiEmpty.poiTemplate.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ac8c5c40a4271e14aab3b9e3a54364bc +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat new file mode 100644 index 00000000..5a977d90 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat @@ -0,0 +1,2327 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Floors + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AOStrength: 1 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphaToMask: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicSpecIgnoresBaseColor: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _Curvature: 0 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugCameraData: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugEnabled: 0 + - _DebugHighMids: 0 + - _DebugLightingData: 0 + - _DebugLowMids: 0 + - _DebugMeshData: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMin: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DistortionUvToDistort: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 128 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _Length: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingDirectionMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMaskUV: 0 + - _LightingShadowMasksUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTexUV: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexUnwrap: 0 + - _VertexWorldTranslationALBand: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GlobalThemes: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_depthFX: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallax: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_stylizedSpec: 0 + - m_end_subsurface: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingCategory: 0 + - m_lightingOptions: 0 + - m_mainCategory: 0 + - m_mainOptions: 0 + - m_modifierCategory: 0 + - m_outlineOptions: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_renderingOptions: 0 + - m_specialFXCategory: 1 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GlobalThemes: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_depthFX: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 1 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 1 + - m_start_emissions: 1 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallax: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_stylizedSpec: 0 + - m_start_subsurface: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat.meta new file mode 100644 index 00000000..0ebbf014 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Floors.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7303f74de3f3d644bae9e7d8952093be +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat new file mode 100644 index 00000000..2e125b9d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat @@ -0,0 +1,2008 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_PoiPro + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_SHADEMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + OptimizedShaderFolder: 267e1b316da597347bc70350979e0e7d + OriginalShader: .poiyomi/V8.0/Pro + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisotropyScaleMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisotropyShiftNoiseMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisotropyTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AudioLinkLocalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AudioLinkMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BacklightColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Bump2ndMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Bump2ndScaleMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Emission2ndBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Emission2ndGradTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Emission2ndMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionGradTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main2ndBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main2ndDissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main2ndDissolveNoiseMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main2ndTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main3rdBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main3rdDissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main3rdDissolveNoiseMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Main3rdTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainGradationTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCap2ndBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCap2ndBumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCap2ndTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCapBlendMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCapBumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatCapTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 2800000, guid: 2b5e0b031839238468f548ae5e30d127, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Shadow2ndColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Shadow3rdColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShadowBlurMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShadowBorderMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShadowColorTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShadowStrengthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaBoostFA: 10 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMaskMode: 0 + - _AlphaMaskScale: 1 + - _AlphaMaskValue: 0 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphaToMask: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _Anisotropy2MatCap: 0 + - _Anisotropy2MatCap2nd: 0 + - _Anisotropy2Reflection: 0 + - _Anisotropy2ndBitangentWidth: 1 + - _Anisotropy2ndShift: 0 + - _Anisotropy2ndShiftNoiseScale: 0 + - _Anisotropy2ndSpecularStrength: 0 + - _Anisotropy2ndTangentWidth: 1 + - _AnisotropyBitangentWidth: 1 + - _AnisotropyScale: 1 + - _AnisotropyShift: 0 + - _AnisotropyShiftNoiseScale: 0 + - _AnisotropySpecularStrength: 1 + - _AnisotropyTangentWidth: 1 + - _ApplyReflection: 0 + - _ApplySpecular: 1 + - _ApplySpecularFA: 1 + - _AsUnlit: 0 + - _AudioLink2Emission: 0 + - _AudioLink2Emission2nd: 0 + - _AudioLink2Emission2ndGrad: 0 + - _AudioLink2EmissionGrad: 0 + - _AudioLink2Main2nd: 0 + - _AudioLink2Main3rd: 0 + - _AudioLink2Vertex: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAsLocal: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 0 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 0 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 0 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 0 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkUVMode: 1 + - _AudioLinkVertexUVMode: 1 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BackfaceForceShadow: 0 + - _BacklightBackfaceMask: 1 + - _BacklightBlur: 0.05 + - _BacklightBorder: 0.35 + - _BacklightDirectivity: 5 + - _BacklightNormalStrength: 1 + - _BacklightReceiveShadow: 1 + - _BacklightViewStrength: 1 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.137 + - _BeforeExposureLimit: 10000 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendOpAlphaFA: 4 + - _BlendOpFA: 4 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _Bump2ndScale: 1 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseStrength: 0.1 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _DstBlendAlpha: 10 + - _DstBlendAlphaFA: 1 + - _DstBlendFA: 1 + - _Emission2ndBlend: 1 + - _Emission2ndFluorescence: 0 + - _Emission2ndGradSpeed: 1 + - _Emission2ndMap_UVMode: 0 + - _Emission2ndParallaxDepth: 0 + - _Emission2ndUseGrad: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlend: 1 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionFluorescence: 0 + - _EmissionGradSpeed: 1 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMap_UVMode: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionParallaxDepth: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissionUseGrad: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipNormal: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterApplyTransparency: 1 + - _GlitterBackfaceMask: 0 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterEnableLighting: 1 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMainStrength: 0 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterNormalStrength: 1 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShadowMask: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUVMode: 0 + - _GlitterUseSurfaceColor: 0 + - _GlitterVRParallaxStrength: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.4247461 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreEncryption: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _Invisible: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightMaxLimit: 1 + - _LightMinLimit: 0.05 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 4 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _Main2ndDissolveNoiseStrength: 0.1 + - _Main2ndEnableLighting: 1 + - _Main2ndTexAngle: 0 + - _Main2ndTexBlendMode: 0 + - _Main2ndTexIsDecal: 0 + - _Main2ndTexIsLeftOnly: 0 + - _Main2ndTexIsMSDF: 0 + - _Main2ndTexIsRightOnly: 0 + - _Main2ndTexShouldCopy: 0 + - _Main2ndTexShouldFlipCopy: 0 + - _Main2ndTexShouldFlipMirror: 0 + - _Main3rdDissolveNoiseStrength: 0.1 + - _Main3rdEnableLighting: 1 + - _Main3rdTexAngle: 0 + - _Main3rdTexBlendMode: 0 + - _Main3rdTexIsDecal: 0 + - _Main3rdTexIsLeftOnly: 0 + - _Main3rdTexIsMSDF: 0 + - _Main3rdTexIsRightOnly: 0 + - _Main3rdTexShouldCopy: 0 + - _Main3rdTexShouldFlipCopy: 0 + - _Main3rdTexShouldFlipMirror: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainGradationStrength: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _MatCap2ndApplyTransparency: 1 + - _MatCap2ndBackfaceMask: 0 + - _MatCap2ndBlend: 1 + - _MatCap2ndBlendMode: 1 + - _MatCap2ndBumpScale: 1 + - _MatCap2ndCustomNormal: 0 + - _MatCap2ndEnableLighting: 1 + - _MatCap2ndLod: 0 + - _MatCap2ndNormalStrength: 1 + - _MatCap2ndPerspective: 1 + - _MatCap2ndShadowMask: 0 + - _MatCap2ndVRParallaxStrength: 1 + - _MatCap2ndZRotCancel: 1 + - _MatCapApplyTransparency: 1 + - _MatCapBackfaceMask: 0 + - _MatCapBlend: 1 + - _MatCapBlendMode: 1 + - _MatCapBumpScale: 1 + - _MatCapCustomNormal: 0 + - _MatCapEnableLighting: 1 + - _MatCapLod: 0 + - _MatCapNormalStrength: 1 + - _MatCapPerspective: 1 + - _MatCapShadowMask: 0 + - _MatCapVRParallaxStrength: 1 + - _MatCapZRotCancel: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _MonochromeLighting: 0 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxOffset: 0.5 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _Reflectance: 0.04 + - _ReflectionApplyTransparency: 1 + - _ReflectionNormalStrength: 1 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimApplyTransparency: 1 + - _RimBackfaceMask: 0 + - _RimBlur: 0.1 + - _RimBorder: 0.5 + - _RimBrighten: 0 + - _RimDirRange: 0 + - _RimDirStrength: 0 + - _RimEnableLighting: 1 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimFresnelPower: 3 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimIndirBlur: 0.1 + - _RimIndirBorder: 0.5 + - _RimIndirRange: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimNormalStrength: 1 + - _RimShadowMask: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimVRParallaxStrength: 1 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0.247 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _Shadow2ndBlur: 0 + - _Shadow2ndBorder: 0.38 + - _Shadow2ndNormalStrength: 1 + - _Shadow3rdBlur: 0.1 + - _Shadow3rdBorder: 0.25 + - _Shadow3rdNormalStrength: 1 + - _ShadowBlur: 0.104 + - _ShadowBorder: 0.5 + - _ShadowBorderRange: 0 + - _ShadowEnvStrength: 0 + - _ShadowMainStrength: 1 + - _ShadowNormalStrength: 1 + - _ShadowOffset: 0 + - _ShadowReceive: 0 + - _ShadowStrength: 0.6 + - _ShiftBackfaceUV: 0 + - _Smoothness: 1 + - _SpecularBlur: 0 + - _SpecularBorder: 0.5 + - _SpecularNormalStrength: 1 + - _SpecularToon: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _SrcBlendAlphaFA: 0 + - _SrcBlendFA: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilComp: 8 + - _StencilCompareFunction: 8 + - _StencilFail: 0 + - _StencilFailOp: 0 + - _StencilPass: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFail: 0 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _SubpassCutoff: 0.5 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseAnisotropy: 0 + - _UseAudioLink: 0 + - _UseBacklight: 0 + - _UseBump2ndMap: 0 + - _UseBumpMap: 0 + - _UseEmission: 0 + - _UseEmission2nd: 0 + - _UseGlitter: 0 + - _UseLightColor: 1 + - _UseMain2ndTex: 0 + - _UseMain3rdTex: 0 + - _UseMatCap: 0 + - _UseMatCap2nd: 0 + - _UseParallax: 0 + - _UseReflection: 0 + - _UseRim: 0 + - _UseShadow: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLightStrength: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZClip: 1 + - _ZTest: 4 + - _ZWrite: 1 + - _e2gai: 2 + - _e2gci: 2 + - _egai: 2 + - _egci: 2 + - _glitterFrequencyLinearEmissive: 20 + - _lilDirectionalLightStrength: 1 + - _lilToonVersion: 0 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 0, b: 0, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 0, g: 0.09174347, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDefaultValue: {r: 0, g: 0, b: 2, a: 0.75} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkLocalMapParams: {r: 120, g: 1, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkStart: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkUVParams: {r: 0.25, g: 0, b: 0, a: 0.125} + - _AudioLinkVertexStart: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkVertexStrength: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkVertexUVParams: {r: 0.25, g: 0, b: 0, a: 0.125} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BacklightColor: {r: 0.85, g: 0.8, b: 0.7, a: 1} + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2nd: {r: 1, g: 1, b: 1, a: 1} + - _Color3rd: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseMask_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveParams: {r: 0, g: 0, b: 0.5, a: 0.1} + - _DissolvePos: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistanceFade: {r: 0.1, g: 0.01, b: 0, a: 0} + - _DistanceFadeColor: {r: 0, g: 0, b: 0, a: 1} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Emission2ndBlendMask_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _Emission2ndBlink: {r: 0, g: 0, b: 3.141593, a: 0} + - _Emission2ndColor: {r: 1, g: 1, b: 1, a: 1} + - _Emission2ndMap_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionBlendMask_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _EmissionBlink: {r: 0, g: 0, b: 3.141593, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterParams1: {r: 256, g: 256, b: 0.16, a: 50} + - _GlitterParams2: {r: 0.25, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _Keys: {r: 0, g: 0, b: 0, a: 0} + - _LightDirectionOverride: {r: 0, g: 0.001, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _Main2ndDissolveColor: {r: 1, g: 1, b: 1, a: 1} + - _Main2ndDissolveNoiseMask_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _Main2ndDissolveParams: {r: 0, g: 0, b: 0.5, a: 0.1} + - _Main2ndDissolvePos: {r: 0, g: 0, b: 0, a: 0} + - _Main2ndDistanceFade: {r: 0.1, g: 0.01, b: 0, a: 0} + - _Main2ndTexDecalAnimation: {r: 1, g: 1, b: 1, a: 30} + - _Main2ndTexDecalSubParam: {r: 1, g: 1, b: 0, a: 1} + - _Main3rdDissolveColor: {r: 1, g: 1, b: 1, a: 1} + - _Main3rdDissolveNoiseMask_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _Main3rdDissolveParams: {r: 0, g: 0, b: 0.5, a: 0.1} + - _Main3rdDissolvePos: {r: 0, g: 0, b: 0, a: 0} + - _Main3rdDistanceFade: {r: 0.1, g: 0.01, b: 0, a: 0} + - _Main3rdTexDecalAnimation: {r: 1, g: 1, b: 1, a: 30} + - _Main3rdTexDecalSubParam: {r: 1, g: 1, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexHSVG: {r: 0, g: 1, b: 1, a: 1} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _MainTex_ScrollRotate: {r: 0, g: 0, b: 0, a: 0} + - _MatCap2ndBlendUV1: {r: 0, g: 0, b: 0, a: 0} + - _MatCap2ndColor: {r: 1, g: 1, b: 1, a: 1} + - _MatCapBlendUV1: {r: 0, g: 0, b: 0, a: 0} + - _MatCapColor: {r: 1, g: 1, b: 1, a: 1} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _ReflectionColor: {r: 1, g: 1, b: 1, a: 1} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimColor: {r: 1, g: 1, b: 1, a: 1} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimIndirColor: {r: 1, g: 1, b: 1, a: 1} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Shadow2ndColor: {r: 1, g: 0, b: 0, a: 1} + - _Shadow3rdColor: {r: 0, g: 0, b: 0, a: 0} + - _ShadowAOShift: {r: 1, g: 0, b: 1, a: 0} + - _ShadowAOShift2: {r: 1, g: 0, b: 1, a: 0} + - _ShadowBorderColor: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0, g: 0.3333335, b: 1, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _e2ga0: {r: 1, g: 0, b: 0, a: 0} + - _e2ga1: {r: 1, g: 0, b: 0, a: 1} + - _e2ga2: {r: 1, g: 0, b: 0, a: 0} + - _e2ga3: {r: 1, g: 0, b: 0, a: 0} + - _e2ga4: {r: 1, g: 0, b: 0, a: 0} + - _e2ga5: {r: 1, g: 0, b: 0, a: 0} + - _e2ga6: {r: 1, g: 0, b: 0, a: 0} + - _e2ga7: {r: 1, g: 0, b: 0, a: 0} + - _e2gc0: {r: 1, g: 1, b: 1, a: 0} + - _e2gc1: {r: 1, g: 1, b: 1, a: 1} + - _e2gc2: {r: 1, g: 1, b: 1, a: 0} + - _e2gc3: {r: 1, g: 1, b: 1, a: 0} + - _e2gc4: {r: 1, g: 1, b: 1, a: 0} + - _e2gc5: {r: 1, g: 1, b: 1, a: 0} + - _e2gc6: {r: 1, g: 1, b: 1, a: 0} + - _e2gc7: {r: 1, g: 1, b: 1, a: 0} + - _ega0: {r: 1, g: 0, b: 0, a: 0} + - _ega1: {r: 1, g: 0, b: 0, a: 1} + - _ega2: {r: 1, g: 0, b: 0, a: 0} + - _ega3: {r: 1, g: 0, b: 0, a: 0} + - _ega4: {r: 1, g: 0, b: 0, a: 0} + - _ega5: {r: 1, g: 0, b: 0, a: 0} + - _ega6: {r: 1, g: 0, b: 0, a: 0} + - _ega7: {r: 1, g: 0, b: 0, a: 0} + - _egc0: {r: 1, g: 1, b: 1, a: 0} + - _egc1: {r: 1, g: 1, b: 1, a: 1} + - _egc2: {r: 1, g: 1, b: 1, a: 0} + - _egc3: {r: 1, g: 1, b: 1, a: 0} + - _egc4: {r: 1, g: 1, b: 1, a: 0} + - _egc5: {r: 1, g: 1, b: 1, a: 0} + - _egc6: {r: 1, g: 1, b: 1, a: 0} + - _egc7: {r: 1, g: 1, b: 1, a: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat.meta new file mode 100644 index 00000000..f89a5354 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiPro.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 267e1b316da597347bc70350979e0e7d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat new file mode 100644 index 00000000..6fe9d8e8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat @@ -0,0 +1,1622 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_PoiProGrabPass + m_Shader: {fileID: 4800000, guid: 2260509a8003e9b4bafc112ed2fb6cf9, type: 3} + m_ShaderKeywords: CHROMATIC_ABERRATION_LOW MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + POI_LIGHT_DATA_ADDITIVE_ENABLE POI_PARALLAX POI_VERTEXLIGHT_ON VIGNETTE_MASKED + _COLORADDSUBDIFF_ON _LIGHTINGMODE_MATHRAMP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3001 + stringTagMap: + OptimizedShaderFolder: M_PoiProGrabPass + OriginalShader: .poiyomi/V8.0/Pro Grab Pass + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GrabPassBlendMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 2800000, guid: 58e30dd711fe79f479c4efccdbfbffd0, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 8900000, guid: 47555b2775c7df342bd7fb73aa6a647f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0.85 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0 + - _AlphaFresnelWidth: 0.698 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission0Enabled: 0 + - _AudioLinkEmission0StrengthBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1Enabled: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 0 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 0 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 0.209 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 1 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableBlur: 1 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableGrabpass: 1 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GrabBlurDirections: 10 + - _GrabBlurDistance: 0.141 + - _GrabBlurQuality: 10 + - _GrabDstBlend: 1 + - _GrabPassBlendFactor: 1 + - _GrabPassBlendMapUV: 0 + - _GrabPassUseAlpha: 1 + - _GrabSrcBlend: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightOffset: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.02 + - _HeightmapUV: 0 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0.5 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingDirectiongMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0.494 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 1 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 1 + - _MatcapBorder: 0.4679 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 1 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapToolTip: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskToolTip: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapToolTip: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 0 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskToolTip: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 1 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RefractionChromaticAberattion: 0 + - _RefractionEnabled: 1 + - _RefractionIndex: 1.33 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _commentIfZero_EnableGrabpass: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_PostProcessing: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_Blur: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_GrabPass: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_Refraction: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvModifiers: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_grabPassCategory: 0 + - m_lightingCategory: 1 + - m_mainCategory: 1 + - m_modifierCategory: 1 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 1 + - m_start_Blur: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_GrabPass: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_Refraction: 1 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 1 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvModifiers: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0.1, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 0} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GrabPassBlendMapPan: {r: -0.1, g: 0, b: 0, a: 0} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat.meta new file mode 100644 index 00000000..c225a997 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProGrabPass.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d40a27cc65267349882f18732ef7026 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat new file mode 100644 index 00000000..43256522 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat @@ -0,0 +1,1633 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_PoiProOutline + m_Shader: {fileID: 4800000, guid: 9cdbe9241ea4aaa48944028272700834, type: 3} + m_ShaderKeywords: GEOM_TYPE_BRANCH POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_PARALLAX POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + OptimizedShaderFolder: M_PoiProOutline + OriginalShader: .poiyomi/V8.0/Pro Outline + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 2800000, guid: 22b312acf1ddb464b96bb02007e2a7e9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmap: + m_Texture: {fileID: 2800000, guid: 22b312acf1ddb464b96bb02007e2a7e9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 1 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission0Enabled: 0 + - _AudioLinkEmission0StrengthBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1Enabled: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 2 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 1 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnableOutlines: 1 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightOffset: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.1 + - _HeightmapUV: 0 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0.5 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingDirectiongMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineColorThemeIndex: 0 + - _LineWidth: 2 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapToolTip: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskToolTip: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapToolTip: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskToolTip: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _Offset_Z: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 0 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 1 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_OutlineCategory: 1 + - m_PostProcessing: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvModifiers: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 0 + - m_mainCategory: 1 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 1 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 1 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 1 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvModifiers: 1 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat.meta new file mode 100644 index 00000000..2c2a2bfd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutline.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8880288ed7295e04d8e1ab2cfc47dfc4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat new file mode 100644 index 00000000..cac66ebf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat @@ -0,0 +1,1623 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_PoiProOutlineEarly + m_Shader: {fileID: 4800000, guid: 1513582543e8f6c44b1981e8689f7a52, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_PARALLAX POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_SHADEMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + OptimizedShaderFolder: M_PoiProOutlineEarly + OriginalShader: .poiyomi/V8.0/Pro Outline Early + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission0Enabled: 0 + - _AudioLinkEmission0StrengthBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1Enabled: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnableOutlines: 1 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightOffset: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.02 + - _HeightmapUV: 0 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0.5 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingDirectiongMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 4 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineColorThemeIndex: 0 + - _LineWidth: 2 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapToolTip: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskToolTip: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapToolTip: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskToolTip: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 1 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 1 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_OutlineCategory: 1 + - m_PostProcessing: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvModifiers: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 1 + - m_modifierCategory: 1 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 1 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvModifiers: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 0.75471693, g: 0.75471693, b: 0.75471693, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat.meta new file mode 100644 index 00000000..c5547918 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_PoiProOutlineEarly.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6308df3a90036fc419866514a1a4ea0a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat new file mode 100644 index 00000000..fb109db0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat @@ -0,0 +1,2297 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Testing 1 + m_Shader: {fileID: 4800000, guid: e9e18fbf88ba9eb44ab0d683cd27c2a3, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _ _COLORCOLOR_ON _EMISSIVE_SIMPLE _LIGHTINGMODE_FLAT + _OUTLINE_NML _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + OptimizedShaderFolder: New Material 1 + OriginalShader: .poiyomi/ProV8a + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: a6d6984545cde4a4f9317b17d6dca225, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AOStrength: 1 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphaToMask: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 0 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 0 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 0 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 0 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicSpecIgnoresBaseColor: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 1 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _Curvature: 0 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugCameraData: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugEnabled: 0 + - _DebugHighMids: 0 + - _DebugLightingData: 0 + - _DebugLowMids: 0 + - _DebugMeshData: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMin: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DistortionUvToDistort: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 1 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.4247461 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _Length: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingDirectionMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 4 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMaskUV: 0 + - _LightingShadowMasksUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTexUV: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _PanoUseBothEyes: 1 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexUnwrap: 0 + - _VertexWorldTranslationALBand: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 1 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GlobalThemes: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_depthFX: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallax: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_stylizedSpec: 0 + - m_end_subsurface: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingCategory: 0 + - m_lightingOptions: 1 + - m_mainCategory: 0 + - m_mainOptions: 0 + - m_modifierCategory: 0 + - m_outlineOptions: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_renderingOptions: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GlobalThemes: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 1 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_depthFX: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallax: 0 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_stylizedSpec: 0 + - m_start_subsurface: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat.meta new file mode 100644 index 00000000..df8d0138 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing 1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c6e9f9c3c33874408623ee63ca38df6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat new file mode 100644 index 00000000..dcad0cb6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat @@ -0,0 +1,1545 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_Testing + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _ _COLORCOLOR_ON _EMISSIVE_SIMPLE _LIGHTINGMODE_FLAT + _OUTLINE_NML _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + OptimizedShaderFolder: New Material 1 + OriginalShader: .poiyomi/ProV8a + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: bb7711dde80ffc949b3171744eb92cdd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 0 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 0 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 0 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 0 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 0.463 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 1 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 1 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.4247461 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 1 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat.meta new file mode 100644 index 00000000..e592db1f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/M_Testing.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3614bbe9905f70f4fa1912bc93f56f71 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat new file mode 100644 index 00000000..6b678418 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat @@ -0,0 +1,2207 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: New Material + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_PARALLAX POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnisoTangentMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFFallback: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BRDFSpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BulgeMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatFallback: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearcoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 8900000, guid: 1f79f71b84fc2844bb81e9ae4f5bc384, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmap: + m_Texture: {fileID: 2800000, guid: 5874c4b0804010f46907ed3c81294735, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HoloAlphaMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadows: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainFadeTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 3d2855f84e40fc0479ba50c9b2822793, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicTintMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OrificeData: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanoMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PanosphereTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxHeightMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxInternalMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimWidthNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SSSThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SmoothnessMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpawnInNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMacro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularAnisoJitterMicro1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMetallicMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoDebugTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoGameboyRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoMaskTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VideoPixelTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VoronoiNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - DSGI: 0 + - Instancing: 0 + - LightmapFlags: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AOStrength: 1 + - _AlphaAngular: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphaToMask: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AnisoSpec1Alpha: 1 + - _AnisoSpec1Alpha1: 1 + - _AnisoSpec2Alpha: 1 + - _AnisoSpec2Alpha1: 1 + - _AnisoTangentMap1UV: 0 + - _AnisoTangentMapUV: 0 + - _AnisoUseTangentMap: 0 + - _AnisoUseTangentMap1: 0 + - _AttenuationMultiplier: 0 + - _AudioLinkAddEmission1Band: 0 + - _AudioLinkAddEmissionBand: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkAverageRange: 0.5 + - _AudioLinkAveraging: 0 + - _AudioLinkCCStripY: 0 + - _AudioLinkDebugAnimate: 0 + - _AudioLinkDebugBass: 0 + - _AudioLinkDebugHighMid: 0 + - _AudioLinkDebugLowMid: 0 + - _AudioLinkDebugTreble: 0 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDelay: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission1CenterOutAddBand: 0 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1StrengthBand: 0 + - _AudioLinkEmissionCenterOutAddBand: 0 + - _AudioLinkEmissionCenterOutBand: 0 + - _AudioLinkEmissionStrengthBand: 0 + - _AudioLinkFlipbookAlphaBand: 0 + - _AudioLinkFlipbookEmissionBand: 0 + - _AudioLinkFlipbookFrameBand: 0 + - _AudioLinkFlipbookScaleBand: 0 + - _AudioLinkHelp: 0 + - _AudioLinkPathEmissionAddBandB: 0 + - _AudioLinkPathEmissionAddBandG: 0 + - _AudioLinkPathEmissionAddBandR: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _AudioLinkPathWidthOffsetBandB: 0 + - _AudioLinkPathWidthOffsetBandG: 0 + - _AudioLinkPathWidthOffsetBandR: 0 + - _AudioLinkRimBrightnessBand: 0 + - _AudioLinkRimEmissionBand: 0 + - _AudioLinkRimWidthBand: 0 + - _AudioLinkTextureVisualization: 0 + - _BRDFAnisotropy: 0 + - _BRDFForceFallback: 0 + - _BRDFGlossiness: 0 + - _BRDFInvertGlossiness: 0 + - _BRDFMetallic: 0 + - _BRDFMetallicGlossMapToolTip: 0 + - _BRDFMetallicGlossMapUV: 0 + - _BRDFMetallicMapToolTip: 0 + - _BRDFMetallicMapUV: 0 + - _BRDFMetallicSpecIgnoresBaseColor: 0 + - _BRDFReflectance: 0.5 + - _BRDFReflectionsEnabled: 1 + - _BRDFSpecularEnabled: 1 + - _BRDFSpecularMapToolTip: 0 + - _BRDFSpecularMapUV: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlackLightMaskClearCoat: 4 + - _BlackLightMaskDebug: 0 + - _BlackLightMaskDissolve: 4 + - _BlackLightMaskEmission: 4 + - _BlackLightMaskEmission2: 4 + - _BlackLightMaskEnabled: 0 + - _BlackLightMaskFlipbook: 4 + - _BlackLightMaskGlitter: 4 + - _BlackLightMaskIridescence: 4 + - _BlackLightMaskMatcap: 4 + - _BlackLightMaskMatcap2: 4 + - _BlackLightMaskMetallic: 4 + - _BlackLightMaskPanosphere: 4 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlendshapeBadScaleFix: 1 + - _BlendshapePower: 1 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BuldgeFadeLength: 0.02 + - _BuldgeHeight: 0.02 + - _BulgeOffset: 0 + - _BulgePower: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _Clearcoat: 1 + - _ClearcoatAnisotropy: 0 + - _ClearcoatEnableReflections: 1 + - _ClearcoatEnableSpecular: 1 + - _ClearcoatForceFallback: 0 + - _ClearcoatGlossiness: 0 + - _ClearcoatHelpBox: 0 + - _ClearcoatInvertSmoothness: 0 + - _ClearcoatMapUV: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _Curvature: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugCameraData: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugEnabled: 0 + - _DebugHighMids: 0 + - _DebugLightingData: 0 + - _DebugLowMids: 0 + - _DebugMeshData: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal1Depth: 0 + - _Decal2Depth: 0 + - _Decal3Depth: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMax: 1 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMin: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthGlowEmission: 3 + - _DepthGradientBlend: 0 + - _DepthGradientTextureUV: 0 + - _DepthGradientUV: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveEmission1Side: 2 + - _DissolveEmissionSide: 2 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.5 + - _DistortionStrength1: 0.5 + - _DistortionStrength1AudioLinkBand: 0 + - _DistortionStrengthAudioLinkBand: 0 + - _DistortionUvToDistort: 0 + - _DitherGradient: 0.1 + - _DitheringEnabled: 0 + - _DstBlend: 0 + - _Emission1CenterOutAddAudioLinkwidth: 1 + - _Emission1CenterOutAudioLinkWidth: 1 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutAddAudioLinkwidth: 1 + - _EmissionCenterOutAudioLinkWidth: 1 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableAudioLinkDebug: 0 + - _EnableBRDF: 0 + - _EnableBulge: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableDistortionAudioLink: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission1CenterOutAudioLink: 0 + - _EnableEmission1StrengthAudioLink: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEmissionCenterOutAudioLink: 0 + - _EnableEmissionStrengthAudioLink: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableHolo: 0 + - _EnableIridescence: 0 + - _EnableLighting: 1 + - _EnableMetallic: 0 + - _EnableMirrorOptions: 0 + - _EnableMirrorTexture: 0 + - _EnablePathing: 0 + - _EnableRandom: 0 + - _EnableRimLighting: 0 + - _EnableSSS: 0 + - _EnableScifiSpawnIn: 0 + - _EnableSpecular: 0 + - _EnableSpecular1: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _EnableVertexGlitch: 0 + - _EnableVideo: 0 + - _EnableVoronoi: 0 + - _EntranceStiffness: 0.01 + - _EntryOpenDuration: 0.1 + - _FadeLength: 20 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForceOpaque: 0 + - _ForgotToLockMaterial: 1 + - _GIEmissionMultiplier: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightOffset: 0.336 + - _HeightSteps: 13 + - _HeightStrength: 0.0706 + - _HeightmapUV: 0 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _HoloCoordinateSpace: 0 + - _HoloFresnelAlpha: 0 + - _HoloLineDensity: 10 + - _HoloRimSharpness: 0.5 + - _HoloRimWidth: 0.5 + - _HoloScrollSpeed: 1 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _InvertSmoothness: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceNormalUV: 0 + - _IridescenceOffset: 0 + - _IridescencePanSpeed: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _Length: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAOTexUV: 0 + - _LightingAdditiveDetailStrength: 1 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDetailShadowsEnabled: 0 + - _LightingDetailShadowsUV: 0 + - _LightingDetailStrength: 1 + - _LightingDirectColorMode: 0 + - _LightingDirectionMode: 0 + - _LightingEnableAO: 0 + - _LightingEnableHSL: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingHSLIntensity: 1 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectColorMode: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinShadowBrightnessRatio: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingOnlyUnityShadows: 0 + - _LightingRampType: 0 + - _LightingShadowHue: 0.5 + - _LightingShadowLightness: 0.5 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMaskUV: 0 + - _LightingShadowMasksUV: 0 + - _LightingShadowSaturation: 0.5 + - _LightingStandardSmoothness: 0 + - _LightingUncapped: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LineWidth: 0 + - _LockTooltip: 0 + - _MainAlphaToCoverage: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainDistanceFadeMax: 0 + - _MainDistanceFadeMin: 0 + - _MainEmissionStrength: 0 + - _MainFadeTextureUV: 0 + - _MainFadeType: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainMaxAlpha: 1 + - _MainMinAlpha: 0 + - _MainMipScale: 0.25 + - _MainShadowClipMod: 0 + - _MainTexUV: 0 + - _MainTextureUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _MetallicMaskUV: 0 + - _MetallicTintMapUV: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _OrifaceEnabled: 0 + - _OrificeChannel: 0 + - _OutlineCull: 1 + - _OutlineEmission: 0 + - _OutlineFixedSize: 0 + - _OutlineHueOffset: 0 + - _OutlineHueOffsetSpeed: 0 + - _OutlineHueShift: 0 + - _OutlineLit: 1 + - _OutlineMaskUV: 0 + - _OutlineMode: 0 + - _OutlineOffsetFactor: 0 + - _OutlineOffsetUnits: 0 + - _OutlineRimLightBlend: 0 + - _OutlineShadowStrength: 1 + - _OutlineStencilCompareFunction: 8 + - _OutlineStencilFailOp: 0 + - _OutlineStencilPassOp: 0 + - _OutlineStencilReadMask: 255 + - _OutlineStencilRef: 0 + - _OutlineStencilWriteMask: 255 + - _OutlineStencilZFailOp: 0 + - _OutlineTextureUV: 0 + - _OutlineTintMix: 0 + - _OutlineUseVertexColors: 0 + - _OutlinesMaxDistance: 9999 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHelp: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PanoBlend: 0 + - _PanoCubeMapToggle: 0 + - _PanoEmission: 0 + - _PanoInfiniteStereoToggle: 0 + - _PanoMaskUV: 0 + - _PanoToggle: 0 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxBias: 0.42 + - _ParallaxHeightMapEnabled: 0 + - _ParallaxHeightMapMaskUV: 0 + - _ParallaxInternalHeightFromAlpha: 0 + - _ParallaxInternalHeightmapMode: 0 + - _ParallaxInternalIterations: 1 + - _ParallaxInternalMapEnabled: 0 + - _ParallaxInternalMapMaskUV: 0 + - _ParallaxInternalMaxDepth: 1 + - _ParallaxInternalMaxFade: 1 + - _ParallaxInternalMinDepth: 0 + - _ParallaxInternalMinFade: 0 + - _ParallaxMap: 0 + - _ParallaxStrength: 0 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PenetratorEnabled: 0 + - _PoiParallax: 1 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _RGBAlpha_UV: 0 + - _RGBBlendMultiplicative: 0 + - _RGBBlue_UV: 0 + - _RGBGreen_UV: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBRed_UV: 0 + - _RGBUseVertexColors: 0 + - _RalivAdvancedHelp: 0 + - _RalivHelp: 0 + - _ReCurvature: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _RimWidthNoiseStrength: 0.1 + - _RimWidthNoiseTextureUV: 0 + - _SSSDistortion: 1 + - _SSSPower: 5 + - _SSSSCale: 0.25 + - _SSSThicknessMapUV: 0 + - _SSSThicknessMod: 0 + - _SampleWorld: 0 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowMix: 0 + - _ShadowMixThreshold: 0.5 + - _ShadowMixWidthMod: 0.5 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _Shape1Depth: 0.1 + - _Shape1Duration: 0.1 + - _Shape2Depth: 0.2 + - _Shape2Duration: 0.1 + - _Shape3Depth: 0.3 + - _Shape3Duration: 0.1 + - _Smoothness: 0 + - _SmoothnessFrom: 1 + - _SmoothnessFrom1: 1 + - _SmoothnessMaskUV: 0 + - _SmoothnessTextureChannel: 0 + - _SpawnInAlpha: 0 + - _SpawnInEmissionOffset: 0.1 + - _SpawnInNoiseIntensity: 0.35 + - _SpawnInVertOffset: 10 + - _SpawnInVertOffsetOffset: 0.1 + - _Spec1Offset: 0 + - _Spec1Offset1: 0 + - _Spec2Smoothness: 0 + - _Spec2Smoothness1: 0 + - _SpecLMOcclusionAdjust: 0.2 + - _SpecWhatTangent: 0 + - _SpecWhatTangent1: 0 + - _SpecularAnisoJitterMacro1UV: 0 + - _SpecularAnisoJitterMacroMultiplier: 0 + - _SpecularAnisoJitterMacroMultiplier1: 0 + - _SpecularAnisoJitterMacroUV: 0 + - _SpecularAnisoJitterMicro1UV: 0 + - _SpecularAnisoJitterMicroMultiplier: 0 + - _SpecularAnisoJitterMicroMultiplier1: 0 + - _SpecularAnisoJitterMicroUV: 0 + - _SpecularAnisoJitterMirrored: 0 + - _SpecularAnisoJitterMirrored1: 0 + - _SpecularHighlights: 1 + - _SpecularInvertSmoothness: 0 + - _SpecularInvertSmoothness1: 0 + - _SpecularLMOcclusion: 0 + - _SpecularMap1UV: 0 + - _SpecularMapUV: 0 + - _SpecularMask1UV: 0 + - _SpecularMaskUV: 0 + - _SpecularMaxBrightness: 0 + - _SpecularMaxBrightness1: 0 + - _SpecularMetallic: 0 + - _SpecularMetallic1: 0 + - _SpecularMetallicMap1UV: 0 + - _SpecularMetallicMapUV: 0 + - _SpecularNormal: 1 + - _SpecularNormal1: 1 + - _SpecularSmoothness: 1 + - _SpecularSmoothness1: 0.75 + - _SpecularToonEnd: 1 + - _SpecularToonEnd1: 1 + - _SpecularToonStart: 0.95 + - _SpecularToonStart1: 0.95 + - _SpecularType: 1 + - _SpecularType1: 1 + - _SqueezeDist: 0 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexGlitchFrequency: 0 + - _VertexGlitchStrength: 1 + - _VertexGlitchThreshold: 1 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexUnwrap: 0 + - _VideoBacklight: 1 + - _VideoCRTPixelEnergizedTime: 1.9 + - _VideoCRTRefreshRate: 24 + - _VideoContrast: 0 + - _VideoEmissionEnabled: 1 + - _VideoEnableDebug: 0 + - _VideoEnableVideoPlayer: 0 + - _VideoPixelateToResolution: 0 + - _VideoRepeatVideoTexture: 0 + - _VideoSaturation: 0 + - _VideoType: 3 + - _VideoUVNumber: 0 + - _VoronoiBlend: 0 + - _VoronoiEffectsMaterialAlpha: 0 + - _VoronoiEmission0: 0 + - _VoronoiEmission1: 0 + - _VoronoiEnableRandomCellColor: 0 + - _VoronoiMaskUV: 0 + - _VoronoiNoiseIntensity: 0.1 + - _VoronoiNoiseUV: 0 + - _VoronoiScale: 5 + - _VoronoiSpace: 0 + - _VoronoiType: 1 + - _Wriggle: 0 + - _WriggleSpeed: 0.28 + - _ZTest: 4 + - _ZWrite: 1 + - __dirty: 1 + - _commentIfZero_EnableOutlinePass: 0 + - _glitterFrequencyLinearEmissive: 20 + - _squeeze: 0 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_ParallaxMap: 0 + - m_Patreon: 0 + - m_PostProcessing: 0 + - m_Special_Effects: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BlackLight: 0 + - m_end_BonusSliders: 0 + - m_end_Bulge: 0 + - m_end_CRT: 0 + - m_end_CenterOutEmission: 0 + - m_end_CenterOutEmission1: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_DistortionAudioLink: 0 + - m_end_Emission1AudioLink: 0 + - m_end_EmissionAudioLink: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_FresnelAlpha: 0 + - m_end_Gameboy: 0 + - m_end_GlobalThemes: 0 + - m_end_Hologram: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_Lighting: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_Metallic: 0 + - m_end_OutlineStencil: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_RimAudioLink: 0 + - m_end_SciFiSpawnIn: 0 + - m_end_ShadowMix: 0 + - m_end_Spawns: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_TouchGlow: 0 + - m_end_TouchOptions: 0 + - m_end_VertexGlitch: 0 + - m_end_Video: 0 + - m_end_VideoDebug: 0 + - m_end_VideoSettings: 0 + - m_end_Voronoi: 0 + - m_end_ambientOcclusion: 0 + - m_end_angularFade: 0 + - m_end_audioLink: 0 + - m_end_audioLinkDebug: 0 + - m_end_backFace: 0 + - m_end_bakedLighting: 0 + - m_end_blending: 0 + - m_end_blinkingEmissionOptions: 0 + - m_end_blinkingEmissionOptions1: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_debugOptions: 0 + - m_end_depthFX: 0 + - m_end_detailShadows: 0 + - m_end_dissolve: 0 + - m_end_dissolveAudioLink: 0 + - m_end_dissolveHueShift: 0 + - m_end_dissolveMasking: 0 + - m_end_distanceFade: 0 + - m_end_distortionFlow: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_glitterHueShift: 0 + - m_end_glitterRandom: 0 + - m_end_glowInDarkEmissionOptions: 0 + - m_end_glowInDarkEmissionOptions1: 0 + - m_end_lightingAdvanced: 0 + - m_end_lightingHSL: 0 + - m_end_lightingModifiers: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_matcap2HueShift: 0 + - m_end_matcapHueShift: 0 + - m_end_mirrorOptions: 0 + - m_end_outlineAdvanced: 0 + - m_end_panosphereOptions: 0 + - m_end_parallax: 0 + - m_end_parallaxAdvanced: 0 + - m_end_parallaxHeightmap: 0 + - m_end_parallaxInternal: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_raliv: 0 + - m_end_ralivAdvanced: 0 + - m_end_ralivOriface: 0 + - m_end_ralivPenetrator: 0 + - m_end_reflectionRim: 0 + - m_end_rimHueShift: 0 + - m_end_rimLightOptions: 0 + - m_end_rimWidthNoise: 0 + - m_end_scrollingEmission1Options: 0 + - m_end_scrollingEmissionOptions: 0 + - m_end_specular: 0 + - m_end_specular1: 0 + - m_end_stylizedSpec: 0 + - m_end_subsurface: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvModifiers: 0 + - m_end_vertexManipulation: 0 + - m_end_voronoiRandom: 0 + - m_lightingCategory: 1 + - m_lightingOptions: 0 + - m_mainCategory: 1 + - m_mainOptions: 0 + - m_modifierCategory: 0 + - m_outlineOptions: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_renderingOptions: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BlackLight: 0 + - m_start_BonusSliders: 0 + - m_start_Bulge: 0 + - m_start_CRT: 0 + - m_start_CenterOutEmission: 0 + - m_start_CenterOutEmission1: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_DistortionAudioLink: 0 + - m_start_Emission1AudioLink: 0 + - m_start_EmissionAudioLink: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_FresnelAlpha: 0 + - m_start_Gameboy: 0 + - m_start_GlobalThemes: 0 + - m_start_Hologram: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_Lighting: 0 + - m_start_MainHueShift: 1 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_Metallic: 0 + - m_start_OutlineStencil: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_RimAudioLink: 0 + - m_start_ScifiSpawnIn: 0 + - m_start_ShadowMix: 0 + - m_start_Spawns: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_TouchGlow: 0 + - m_start_TouchOptions: 0 + - m_start_VertexGlitch: 0 + - m_start_Video: 0 + - m_start_VideoDebug: 0 + - m_start_VideoSettings: 0 + - m_start_Voronoi: 0 + - m_start_ambientOcclusion: 0 + - m_start_angularFade: 0 + - m_start_audioLink: 0 + - m_start_audioLinkDebug: 0 + - m_start_backFace: 0 + - m_start_bakedLighting: 0 + - m_start_blending: 0 + - m_start_blinkingEmissionOptions: 0 + - m_start_blinkingEmissionOptions1: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_debugOptions: 0 + - m_start_depthFX: 0 + - m_start_detailShadows: 0 + - m_start_dissolve: 0 + - m_start_dissolveAudioLink: 0 + - m_start_dissolveHueShift: 0 + - m_start_dissolveMasking: 0 + - m_start_distanceFade: 0 + - m_start_distortionFlow: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_glitterHueShift: 0 + - m_start_glitterRandom: 0 + - m_start_glowInDarkEmissionOptions: 0 + - m_start_glowInDarkEmissionOptions1: 0 + - m_start_lightingAdvanced: 0 + - m_start_lightingHSL: 0 + - m_start_lightingModifiers: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_matcap2HueShift: 0 + - m_start_matcapHueShift: 0 + - m_start_mirrorOptions: 0 + - m_start_outlineAdvanced: 0 + - m_start_panosphereOptions: 0 + - m_start_parallax: 1 + - m_start_parallaxAdvanced: 0 + - m_start_parallaxHeightmap: 0 + - m_start_parallaxInternal: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_raliv: 0 + - m_start_ralivAdvanced: 0 + - m_start_ralivOriface: 0 + - m_start_ralivPenetrator: 0 + - m_start_reflectionRim: 0 + - m_start_rimHueShift: 0 + - m_start_rimLightOptions: 0 + - m_start_rimWidthNoise: 0 + - m_start_scrollingEmissionOptions: 0 + - m_start_scrollingEmissionOptions1: 0 + - m_start_specular: 0 + - m_start_specular1: 0 + - m_start_stylizedSpec: 0 + - m_start_subsurface: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvModifiers: 0 + - m_start_vertexManipulation: 0 + - m_start_voronoiRandom: 0 + - m_thirdparty: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + - shader_presets: 0 + - shader_properties_label_file: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 0} + - _AnisoTangentMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _AnisoTangentMapPan: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkAddEmission1: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookAlpha: {r: 1, g: 1, b: 0, a: 0} + - _AudioLinkFlipbookEmission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookFrame: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkFlipbookScale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathEmissionAddR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathWidthOffsetB: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetG: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathWidthOffsetR: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimBrightnessAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimEmissionAdd: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkRimWidthAdd: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicGlossMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BRDFSpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFacePanning: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlackLightMaskEnd: {r: 1, g: 1, b: 1, a: 1} + - _BlackLightMaskKeys: {r: 2, g: 3, b: 4, a: 5} + - _BlackLightMaskStart: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGlowColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthGradientPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionSpeed1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DistortionStrength1AudioLink: {r: 0, g: 0, b: 0, a: 0} + - _DistortionStrengthAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink: {r: 0, g: 0, b: 0, a: 0} + - _EmissionCenterOutAddAudioLink1: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _HoloDirection: {r: 0, g: 1, b: 0, a: 1} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOTexPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainFadeTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MetallicMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MetallicTintMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _OutlineDropShadowOffset: {r: 1, g: 0, b: 0, a: 0} + - _OutlineFadeDistance: {r: 0, g: 0, b: 0, a: 0} + - _OutlineMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _OutlinePersonaDirection: {r: 1, g: 0, b: 0, a: 0} + - _OutlineTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _PanoMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PanosphereColor: {r: 1, g: 1, b: 1, a: 1} + - _PanospherePan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxHeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalMaxColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalMinColor: {r: 1, g: 1, b: 1, a: 1} + - _ParallaxInternalPanDepthSpeed: {r: 0, g: 0, b: 0, a: 0} + - _ParallaxInternalPanSpeed: {r: 0, g: 0, b: 0, a: 0} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBAlphaPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBBluePanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBGreenPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RGBMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _RGBRedPanning: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _RimWidthNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _SSSColor: {r: 1, g: 0, b: 0, a: 1} + - _SSSThicknessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SmoothnessMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpawnInEmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpawnInGradientFinish: {r: 0, g: -2, b: 0, a: 1} + - _SpawnInGradientStart: {r: 0, g: 2, b: 0, a: 1} + - _SpecularAnisoJitterMacro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMacroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicro1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularAnisoJitterMicroPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _SpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _SpecularTint1: {r: 1, g: 1, b: 1, a: 1} + - _SpecularToonInnerOuter: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SpecularToonInnerOuter1: {r: 0.25, g: 0.3, b: 0, a: 1} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationHeightPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VideoMaskPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoOffset: {r: 0, g: 0, b: 0, a: 0} + - _VideoPanning: {r: 0, g: 0, b: 0, a: 0} + - _VideoResolution: {r: 1280, g: 720, b: 0, a: 1} + - _VideoTiling: {r: 1, g: 1, b: 0, a: 0} + - _VoronoiColor0: {r: 0, g: 0, b: 0, a: 1} + - _VoronoiColor1: {r: 1, g: 1, b: 1, a: 1} + - _VoronoiGradient: {r: 0.04, g: 0.05, b: 0, a: 0} + - _VoronoiMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _VoronoiRandomMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiRandomMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _VoronoiSpeed: {r: 3, g: 3, b: 3, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat.meta new file mode 100644 index 00000000..533582bb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/New Material.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f14f30cdcd6d6824fb2e622d134b1426 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc new file mode 100644 index 00000000..259d91c4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc @@ -0,0 +1,4 @@ +[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] ThemeIndex ("", Int) = 0 +float ThemeIndex; +--{reference_property:} +poiThemeColor(poiMods, src, index) \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc.meta new file mode 100644 index 00000000..04a1178e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Notes.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: de603dfb7aa45264aae1a1e5d12eccc9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders.meta new file mode 100644 index 00000000..b756b31a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0efafd708629ace468e60effedd0a5a8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro.meta new file mode 100644 index 00000000..ac13f9aa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb51a3360fb78e643ac1e3769f7fd446 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader new file mode 100644 index 00000000..34f0c75c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader @@ -0,0 +1,11569 @@ +Shader "Hidden/Locked/.poiyomi/V8.0/Pro/267e1b316da597347bc70350979e0e7d" +{ + Properties + { + [HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 + [HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 + [HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 + [HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 + [HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + [HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 + _Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 + _MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + _Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + [HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness ("Brightness", Range(-1, 1)) = 0 + [ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 + _MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + [Space(4)] + [ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + _MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + [ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + [Space(4)] + [ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 + [ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 + _AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + [Space(4)] + [ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 + _AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + [Space(4)] + [ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 + [Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 + _AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 + _AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 + _AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + _AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + [Space(4)] + [ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 + _AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 + _AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + _AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + [ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + [Space(4)] + [ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) + _CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + [Space(4)] + [ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 + _DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } + [HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + [HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + [Space(10)] + [ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + _VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + _VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + [ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + [HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 + [HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 + _BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _BackFaceAlpha ("Alpha", Range(0,1)) = 1 + _BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + [ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 + _BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 + _BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + [HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + [RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 + _RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 + _GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 + _GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 + _BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 + _BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 + _AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 + _AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 + _RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + [HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 + [RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 + _DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + _Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 + _DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + _Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 + _DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + _Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 + _DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + _Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 + _AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) + _AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) + [ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + [HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 + _GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) + _GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) + _GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) + _GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) + [HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + [HideInInspector] m_lightingCategory ("Shading", Float) = 0 + [HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 + _LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 + [HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 + [HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 + [HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 + [Space(15)] + [ThryHeaderLabel(Base Pass Lighting, 13)] + [Space(4)] + [Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 + [Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 + [Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 + [Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) + [ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 + _LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 + _Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 + [ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 + _LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 + _LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 + _LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 + _LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 + _LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 + _LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + [Space(15)] + [ThryHeaderLabel(Add Pass Lighting, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 + [ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 + _LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 + _LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + _LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 + [Space(15)] + [ThryHeaderLabel(Vertex Lighting, 13)] + [Space(4)] + [ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 + [Space(15)] + [ThryHeaderLabel(Debug Visualization, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 + [ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + [HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + [HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 + [ThryHeaderLabel(Base Pass Shading, 13)] + [Space(4)] + [KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 + _LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } + _ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 + _LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 + _LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + _1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + [Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 + _LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 + _SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } + _SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) + [NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } + [ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } + [HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 + [ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 + [Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0,1)) = 0 + _ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35,1)) = 0.5 + _ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0,1)) = 0.5 + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 1 + _LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + [Space(15)] + [ThryHeaderLabel(Add Pass Shading, 13)] + [Space(4)] + [Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + [HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 + [HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 + _MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + _MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + [HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 + _Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + _Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + [HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 + [HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 + [ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 + _CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } + _CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 + _CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 + _CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 + _CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 + _CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 + _CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 + _CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + [HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 + [HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + [Space(10)] + [ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 + _RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 + _RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + [HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + _MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 + _MochieSpecularStrength ("Specular", Range(0, 1)) = 1 + _MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 + _MochieRoughnessMultiplier ("Roughness", Range(0, 1)) = 1 + _MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 + _MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 + [Space(8)] + [ThryTexture]_MochieMetallicMap ("Metallic Map (B)--{reference_properties:[_MochieMetallicMapPan, _MochieMetallicMapUV, _MochieMetallicMapInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieMetallicMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapUV ("UV", Int) = 0 + [ThryTexture]_MochieRoughnessMap ("Roughness Map (G)--{reference_properties:[_MochieRoughnessMapPan, _MochieRoughnessMapUV, _MochieRoughnessMapInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieRoughnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieRoughnessMapUV ("UV", Int) = 0 + [ThryTexture]_MochieReflectionMask ("Reflection Mask (R)--{reference_properties:[_MochieReflectionMaskPan, _MochieReflectionMaskUV, _MochieReflectionMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieReflectionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieReflectionMaskUV ("UV", Int) = 0 + [ThryTexture]_MochieSpecularMask ("Specular Mask (R)--{reference_properties:[_MochieSpecularMaskPan, _MochieSpecularMaskUV, _MochieSpecularMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieSpecularMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieSpecularMaskUV ("UV", Int) = 0 + [Space(8)] + [ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } + [ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 + [ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + [HideInInspector] m_end_brdf ("", Float) = 0 + [HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 + [HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + _ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + _ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + [NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + [ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + _ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 + _ClearCoat ("Clear Coat", Range(0, 1)) = 1 + _ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 + [ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 + [ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + [HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 + [HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 + _RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("", Float) = 0 + [HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 + [HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + [ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 + _HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 + _Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } + [HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 + [HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 + [ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 + [ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + _StylizedSpecularStrength ("Strength", Float) = 1 + [ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 + [Space(8)] + [ThryHeaderLabel(Layer 1, 13)] + _HighColor_Power ("Size", Range(0, 1)) = 0.2 + _StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 + _Layer1Strength ("Strength", Range(0, 1)) = 1 + [Space(8)] + [ThryHeaderLabel(Layer 2, 13)] + _Layer2Size ("Size", Range(0, 1)) = 0 + _StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 + _Layer2Strength ("Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_stylizedSpec ("", Float) = 0 + [HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 + [HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 + [Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) + [HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + [HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 + [HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 + _DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + [HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + [HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 + _FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 + _FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + _FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 + _FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + [HideInInspector] m_start_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 + [HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + _EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 + _EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + _EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 + _EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emissionOptions ("", Float) = 0 + [HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + _EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 + _EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + _EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 + _EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission1Options ("", Float) = 0 + [HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 + _EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 + _EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 + _EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 + _GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 + _EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + _EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 + _EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 + _EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + [Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + _EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + [Space(10)] + [ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission2Options ("", Float) = 0 + [HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 + [ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 + _EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 + _EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 + _EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 + _GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 + _EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + _EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 + _EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 + _EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + [Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + _EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + [Space(10)] + [ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission3Options ("", Float) = 0 + [HideInInspector] m_end_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 + [Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 + _GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + [Space(10)] + [ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 + _GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + [Space(10)] + [ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 + [HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 + [ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) + _PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 + [HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 + [HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 + [HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 + [Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) + [Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) + [Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + [Header(Timing Options)] + [Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) + [Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + [HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Header(Time Offset)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) + [HideInInspector] m_end_PathAudioLink ("", Float) = 0 + [HideInInspector] m_end_pathing ("", Float) = 0 + [HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 + _MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + [HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 + _DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + [Space(10)] + [ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 + [ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 + _DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 + _DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 + _DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 + _DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 + _DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 + _DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + [Space(10)] + [ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 + _DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 + _DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 + _DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 + _DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 + [HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + [HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + [HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + [HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 + _TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + [HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + [HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 + [HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 + [ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 + [ThryHeaderLabel(Debug Visualizer, 13)] + [ToggleUI]_DebugWaveform("Waveform", Float) = 0 + [ToggleUI]_DebugDFT("DFT", Float) = 0 + [ToggleUI]_DebugBass("Bass", Float) = 0 + [ToggleUI]_DebugLowMids("Low Mids", Float) = 0 + [ToggleUI]_DebugHighMids("High Mids", Float) = 0 + [ToggleUI]_DebugTreble("Treble", Float) = 0 + [ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 + [ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 + [ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 + [ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 + [ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 + [Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + [HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 + [HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 + [HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + [ThryHeaderLabel(Transform, 13)] + [Space(4)] + [Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 + [Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) + _ALUVScale ("Scale", Vector) = (1, 1, 1, 1) + _ALUVRotation ("Rotation", Range(0, 360)) = 0 + _ALUVRotationSpeed ("Rotation Speed", Float) = 0 + _ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 + _ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + [Space][ThryHeaderLabel(Volume, 13)] + [Space(4)] + _ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 + _ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 + _ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + [Space][ThryHeaderLabel(Band, 13)] + [Space(4)] + _ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 + _ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 + _ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + [Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 + _ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + _ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + [Space][ThryHeaderLabel(Audio Mods, 13)] + [Space(4)] + _ALDecalVolume ("Volume", Int) = 0.5 + _ALDecalBaseBoost ("Bass Boost", Float) = 5.0 + _ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + [Space][ThryHeaderLabel(Colors and Blending, 13)] + [Space(4)] + [Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 + _ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) + _ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) + _ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) + _ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 + _ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 + _ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + [HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 + [HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 + [HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 + _DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 + _DistortionStrength ("Strength1", Float) = 0.03 + _DistortionStrength1 ("Strength2", Float) = 0.01 + [HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + [HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 + [ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 + [ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 + [HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + [HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 + [Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) + _PolarRadialScale ("Radial Scale", Float) = 1 + _PolarLengthScale ("Length Scale", Float) = 1 + _PolarSpiralPower ("Spiral Power", Float) = 0 + [HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 + [HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 + [HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + [ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + _HeightStrength ("Strength", Range(0, 1)) = 0.4247461 + _CurvatureU ("Curvature U", Range(0, 100)) = 0 + _CurvatureV ("Curvature V", Range(0, 30)) = 0 + [IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 + [IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 + _CurvFix ("Curvature Bias", Range(0, 1)) = 1 + [HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + [HideInInspector] m_thirdpartyCategory ("Third Party", Float) = 0 + [HideInInspector] m_postprocessing ("Post Processing", Float) = 0 + [HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 + [Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 + _PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 + _PPLightingAddition ("Lighting Add", Float) = 0 + _PPEmissionMultiplier ("Emission Multiplier", Float) = 1 + _PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 + [HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + [HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 + [ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + [NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} + _PPLUTStrength("LUT Strength", Range(0,1)) = 0 + _PPHue("Hue", Range(0,1)) = 0 + [HDR]_PPTint("Tint", Color) = (1,1,1,1) + [Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) + _PPContrast("Contrast", Float) = 1 + _PPSaturation("Saturation", Float) = 1 + _PPBrightness("Brightness", Float) = 1 + _PPLightness("Lightness", Float) = 0 + _PPHDR("HDR", Float) = 0 + [HideInInspector] m_end_postprocess ("", Float) = 0 + [HideInInspector] m_renderingCategory ("Rendering", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + [ThryWideEnum(Standard,0,Toon,1,Toon Cutout,2)] enum_fallback("VRC Fallback--{on_value:''0,tag::VRCFallback=Cutout;1,tag::VRCFallback=Toon;2,tag::VRCFallback=ToonCutout''}", Float) = 0 + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + } + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + Pass + { + Tags { "LightMode" = "ForwardBase" } + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + CGPROGRAM +#define OPTIMIZER_ENABLED +#define COLOR_GRADING_HDR_3D +#define POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE +#define POI_LIGHT_DATA_ADDITIVE_ENABLE +#define POI_MATCAP0 +#define POI_MATCAP0_CUSTOM_NORMAL +#define POI_MATCAP1_CUSTOM_NORMAL +#define POI_PARALLAX +#define POI_VERTEXLIGHT_ON +#define VIGNETTE_MASKED +#define _LIGHTINGMODE_WRAPPED +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 0 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINCATEGORY 0 +#define PROP_COLORTHEMEINDEX 0 +#define PROP_MAINTEX +#define PROP_MAINTEXUV 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROP_CUTOFF 0.5 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTOGGLE 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROP_MAINHUESHIFTREPLACE 1 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_MAINHUEALCTENABLED 0 +#define PROP_MAINALHUESHIFTBAND 0 +#define PROP_MAINALHUESHIFTCTINDEX 0 +#define PROP_MAINHUEALMOTIONSPEED 1 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_ALPHA 1 +#define PROP_ALPHAFORCEOPAQUE 0 +#define PROP_ALPHAMOD 0 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHATOCOVERAGE 0 +#define PROP_ALPHASHARPENEDA2C 0 +#define PROP_ALPHAMIPSCALE 0.25 +#define PROP_ALPHADITHERING 0 +#define PROP_ALPHADITHERGRADIENT 0.1 +#define PROP_ALPHADISTANCEFADE 0 +#define PROP_ALPHADISTANCEFADETYPE 1 +#define PROP_ALPHADISTANCEFADEMINALPHA 0 +#define PROP_ALPHADISTANCEFADEMAXALPHA 1 +#define PROP_ALPHADISTANCEFADEMIN 0 +#define PROP_ALPHADISTANCEFADEMAX 0 +#define PROP_ALPHAFRESNEL 1 +#define PROP_ALPHAFRESNELALPHA 0 +#define PROP_ALPHAFRESNELSHARPNESS 0.5 +#define PROP_ALPHAFRESNELWIDTH 0.5 +#define PROP_ALPHAFRESNELINVERT 0 +#define PROP_ALPHAANGULAR 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROP_ALPHAAUDIOLINKENABLED 0 +#define PROP_ALPHAAUDIOLINKADDBAND 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTINTTHEMEINDEX 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTMASKUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROP_VERTEXAUDIOLINKENABLED 0 +#define PROP_VERTEXLOCALTRANSLATIONALBAND 0 +#define PROP_VERTEXLOCALROTATIONALBANDX 0 +#define PROP_VERTEXLOCALROTATIONALBANDY 0 +#define PROP_VERTEXLOCALROTATIONALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDX 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEX 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDY 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEY 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEZ 0 +#define PROP_VERTEXLOCALSCALEALBAND 0 +#define PROP_VERTEXWORLDTRANSLATIONALBAND 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBAND 0 +#define PROP_VERTEXROUNDINGRANGEBAND 0 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORINGLINEARSPACE 1 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACECOLORTHEMEINDEX 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROP_BACKFACEALPHA 1 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEMASKUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEREPLACEALPHA 0 +#define PROP_BACKFACEHUESHIFTENABLED 0 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEHUESHIFTSPEED 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_REDCOLORTHEMEINDEX 0 +#define PROP_REDTEXUREUV 0 +#define PROP_GREENCOLORTHEMEINDEX 0 +#define PROP_GREENTEXTUREUV 0 +#define PROP_BLUECOLORTHEMEINDEX 0 +#define PROP_BLUETEXTUREUV 0 +#define PROP_ALPHACOLORTHEMEINDEX 0 +#define PROP_ALPHATEXTUREUV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROP_RGBNORMALAUV 0 +#define PROP_RGBNORMALASCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECAL0MASKCHANNEL 0 +#define PROP_DECALCOLORTHEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALOVERIDEALPHA 0 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROP_DECAL0HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECAL1MASKCHANNEL 1 +#define PROP_DECALCOLOR1THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALOVERIDEALPHA1 0 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROP_DECAL1HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECAL2MASKCHANNEL 2 +#define PROP_DECALCOLOR2THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALOVERIDEALPHA2 0 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROP_DECAL2HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECAL3MASKCHANNEL 3 +#define PROP_DECALCOLOR3THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALOVERIDEALPHA3 0 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROP_DECAL3HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3SIDEBAND 0 +#define PROP_AUDIOLINKDECAL3ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROP_AUDIOLINKDECALX 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_GLOBALTHEMES 0 +#define PROPM_END_GLOBALTHEMES 0 +#define PROPM_LIGHTINGCATEGORY 1 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_LIGHTINGAOMAPSUV 0 +#define PROP_LIGHTDATAAOSTRENGTHR 1 +#define PROP_LIGHTDATAAOSTRENGTHG 0 +#define PROP_LIGHTDATAAOSTRENGTHB 0 +#define PROP_LIGHTDATAAOSTRENGTHA 0 +#define PROP_LIGHTINGDETAILSHADOWMAPSUV 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHR 1 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHG 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHB 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHA 0 +#define PROP_LIGHTINGSHADOWMASKSUV 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHR 1 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHG 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHB 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHA 0 +#define PROP_LIGHTINGCOLORMODE 1 +#define PROP_LIGHTINGMAPMODE 0 +#define PROP_LIGHTINGDIRECTIONMODE 0 +#define PROP_LIGHTINGFORCECOLORENABLED 0 +#define PROP_LIGHTINGFORCEDCOLORTHEMEINDEX 0 +#define PROP_UNLIT_INTENSITY 1 +#define PROP_LIGHTINGCAPENABLED 1 +#define PROP_LIGHTINGCAP 1 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINLIGHTINDIBRIGHTNESS 0 +#define PROP_LIGHTINGINDIRECTUSESNORMALS 0 +#define PROP_LIGHTINGCASTEDSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEENABLE 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_LIGHTINGADDITIVELIMITED 0 +#define PROP_LIGHTINGADDITIVELIMIT 1 +#define PROP_LIGHTINGADDITIVEMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGVERTEXLIGHTINGENABLED 1 +#define PROP_LIGHTDATADEBUGENABLED 0 +#define PROP_LIGHTINGDEBUGVISUALIZE 0 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POISHADING 0 +#define PROP_SHADINGENABLED 1 +#define PROP_LIGHTINGMODE 2 +#define PROP_TOONRAMP +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_LIGHTINGGRADIENTSTARTWRAP 0 +#define PROP_LIGHTINGGRADIENTENDWRAP 0.5 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_SHADINGSHADEMAPBLENDTYPE 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_SKINLUT +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_CLOTHDFG +#define PROP_CLOTHMETALLICSMOOTHNESSMAPINVERT 0 +#define PROP_CLOTHMETALLICSMOOTHNESSMAPUV 0 +#define PROP_CLOTHLERP 0 +#define PROP_CLOTHMETALLIC 0 +#define PROP_CLOTHREFLECTANCE 0.5 +#define PROP_CLOTHSMOOTHNESS 0.5 +#define PROP_SHADOWSTRENGTH 1 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROPM_END_POISHADING 0 +#define PROPM_START_MATCAP 1 +#define PROP_MATCAPENABLE 1 +#define PROP_MATCAPUVMODE 1 +#define PROP_MATCAPCOLORTHEMEINDEX 0 +#define PROP_MATCAP +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 0 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPALPHAOVERRIDE 0 +#define PROP_MATCAPNORMAL 1 +#define PROP_MATCAP0CUSTOMNORMAL 1 +#define PROP_MATCAP0NORMALMAP +#define PROP_MATCAP0NORMALMAPUV 0 +#define PROP_MATCAP0NORMALMAPSCALE 1 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 1 +#define PROP_MATCAP2ENABLE 1 +#define PROP_MATCAP2UVMODE 1 +#define PROP_MATCAP2COLORTHEMEINDEX 0 +#define PROP_MATCAP2 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 1 +#define PROP_MATCAP2ALPHAOVERRIDE 0 +#define PROP_MATCAP2NORMAL 1 +#define PROP_MATCAP1CUSTOMNORMAL 1 +#define PROP_MATCAP1NORMALMAP +#define PROP_MATCAP1NORMALMAPUV 0 +#define PROP_MATCAP1NORMALMAPSCALE 1 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_CUBEMAP 0 +#define PROP_CUBEMAPENABLED 0 +#define PROP_CUBEMAPUVMODE 1 +#define PROP_CUBEMAPCOLORTHEMEINDEX 0 +#define PROP_CUBEMAPMASKUV 0 +#define PROP_CUBEMAPMASKINVERT 0 +#define PROP_CUBEMAPEMISSIONSTRENGTH 0 +#define PROP_CUBEMAPINTENSITY 1 +#define PROP_CUBEMAPLIGHTMASK 0 +#define PROP_CUBEMAPREPLACE 1 +#define PROP_CUBEMAPMULTIPLY 0 +#define PROP_CUBEMAPADD 0 +#define PROP_CUBEMAPNORMAL 1 +#define PROP_CUBEMAPHUESHIFTENABLED 0 +#define PROP_CUBEMAPHUESHIFTSPEED 0 +#define PROP_CUBEMAPHUESHIFT 0 +#define PROPM_END_CUBEMAP 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMLIGHTCOLORTHEMEINDEX 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.25 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_BRDF 0 +#define PROP_MOCHIEBRDF 0 +#define PROP_MOCHIEREFLECTIONSTRENGTH 1 +#define PROP_MOCHIESPECULARSTRENGTH 1 +#define PROP_MOCHIEMETALLICMULTIPLIER 0 +#define PROP_MOCHIEROUGHNESSMULTIPLIER 1 +#define PROP_MOCHIEREFLECTIONTINTTHEMEINDEX 0 +#define PROP_MOCHIESPECULARTINTTHEMEINDEX 0 +#define PROP_MOCHIEMETALLICMAPINVERT 0 +#define PROP_MOCHIEMETALLICMAPUV 0 +#define PROP_MOCHIEROUGHNESSMAPINVERT 0 +#define PROP_MOCHIEROUGHNESSMAPUV 0 +#define PROP_MOCHIEREFLECTIONMASKINVERT 0 +#define PROP_MOCHIEREFLECTIONMASKUV 0 +#define PROP_MOCHIESPECULARMASKINVERT 0 +#define PROP_MOCHIESPECULARMASKUV 0 +#define PROP_MOCHIEFORCEFALLBACK 0 +#define PROP_MOCHIELITFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATSMOOTHNESSMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOATMASKUV 0 +#define PROP_CLEARCOATNORMAL 0 +#define PROP_CLEARCOATTINTTHEMEINDEX 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATSMOOTHNESS 0 +#define PROP_CLEARCOATSAMPLEWORLD 1 +#define PROP_CLEARCOATFORCELIGHTING 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_STYLIZEDSPEC 0 +#define PROP_STYLIZEDSPECULAR 0 +#define PROP_HIGHCOLOR_TEXUV 0 +#define PROP_HIGHCOLORTHEMEINDEX 0 +#define PROP_SET_HIGHCOLORMASKUV 0 +#define PROP_TWEAK_HIGHCOLORMASKLEVEL 0 +#define PROP_IS_SPECULARTOHIGHCOLOR 0 +#define PROP_IS_BLENDADDTOHICOLOR 0 +#define PROP_STYLIZEDSPECULARSTRENGTH 1 +#define PROP_USELIGHTCOLOR 1 +#define PROP_HIGHCOLOR_POWER 0.2 +#define PROP_STYLIZEDSPECULARFEATHER 0 +#define PROP_LAYER1STRENGTH 1 +#define PROP_LAYER2SIZE 0 +#define PROP_STYLIZEDSPECULAR2FEATHER 0 +#define PROP_LAYER2STRENGTH 0 +#define PROPM_END_STYLIZEDSPEC 0 +#define PROPM_SPECIALFXCATEGORY 1 +#define PROPM_START_UDIMDISCARDOPTIONS 0 +#define PROP_ENABLEUDIMDISCARDOPTIONS 0 +#define PROP_UDIMDISCARDUV 0 +#define PROP_UDIMDISCARDMODE 1 +#define PROPM_END_UDIMDISCARDOPTIONS 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGECOLORTHEMEINDEX 0 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETEXTURECOLORTHEMEINDEX 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKCOLORTHEMEINDEX 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_FLIPBOOKCHRONOTENSITYENABLED 0 +#define PROP_FLIPBOOKCHRONOTENSITYBAND 0 +#define PROP_FLIPBOOKCHRONOTENSITYSPEED 1 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_EMISSIONS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE0 0 +#define PROP_EMISSIONCOLORTHEMEINDEX 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMASK +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 1 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROP_EMISSIONAL0ENABLED 0 +#define PROP_EMISSIONAL0STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION0CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTBAND 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONREPLACE1 1 +#define PROP_EMISSIONCOLOR1THEMEINDEX 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMASK1 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 1 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROP_EMISSIONAL1ENABLED 0 +#define PROP_EMISSIONAL1STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION1CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_EMISSION2OPTIONS 0 +#define PROP_ENABLEEMISSION2 0 +#define PROP_EMISSIONREPLACE2 1 +#define PROP_EMISSIONCOLOR2THEMEINDEX 0 +#define PROP_EMISSIONMAP2UV 0 +#define PROP_EMISSIONBASECOLORASMAP2 0 +#define PROP_EMISSIONMASK2 +#define PROP_EMISSIONMASK2UV 0 +#define PROP_EMISSIONSTRENGTH2 1 +#define PROP_EMISSIONHUESHIFTENABLED2 0 +#define PROP_EMISSIONHUESHIFT2 0 +#define PROP_EMISSIONHUESHIFTSPEED2 0 +#define PROP_EMISSIONCENTEROUTENABLED2 0 +#define PROP_EMISSIONCENTEROUTSPEED2 5 +#define PROP_ENABLEGITDEMISSION2 0 +#define PROP_GITDEWORLDORMESH2 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER2 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER2 0 +#define PROP_GITDEMINLIGHT2 0 +#define PROP_GITDEMAXLIGHT2 1 +#define PROP_EMISSIONBLINKINGENABLED2 0 +#define PROP_EMISSIVEBLINK_MIN2 0 +#define PROP_EMISSIVEBLINK_MAX2 1 +#define PROP_EMISSIVEBLINK_VELOCITY2 4 +#define PROP_EMISSIONBLINKINGOFFSET2 0 +#define PROP_SCROLLINGEMISSION2 0 +#define PROP_EMISSIONSCROLLINGUSECURVE2 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR2 0 +#define PROP_EMISSIVESCROLL_WIDTH2 10 +#define PROP_EMISSIVESCROLL_VELOCITY2 10 +#define PROP_EMISSIVESCROLL_INTERVAL2 20 +#define PROP_EMISSIONAL2ENABLED 0 +#define PROP_EMISSIONAL2STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION2CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTBAND 0 +#define PROPM_END_EMISSION2OPTIONS 0 +#define PROPM_START_EMISSION3OPTIONS 0 +#define PROP_ENABLEEMISSION3 0 +#define PROP_EMISSIONREPLACE3 1 +#define PROP_EMISSIONCOLOR3THEMEINDEX 0 +#define PROP_EMISSIONMAP3UV 0 +#define PROP_EMISSIONBASECOLORASMAP3 0 +#define PROP_EMISSIONMASK3 +#define PROP_EMISSIONMASK3UV 0 +#define PROP_EMISSIONSTRENGTH3 1 +#define PROP_EMISSIONHUESHIFTENABLED3 0 +#define PROP_EMISSIONHUESHIFT3 0 +#define PROP_EMISSIONHUESHIFTSPEED3 0 +#define PROP_EMISSIONCENTEROUTENABLED3 0 +#define PROP_EMISSIONCENTEROUTSPEED3 5 +#define PROP_ENABLEGITDEMISSION3 0 +#define PROP_GITDEWORLDORMESH3 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER3 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER3 0 +#define PROP_GITDEMINLIGHT3 0 +#define PROP_GITDEMAXLIGHT3 1 +#define PROP_EMISSIONBLINKINGENABLED3 0 +#define PROP_EMISSIVEBLINK_MIN3 0 +#define PROP_EMISSIVEBLINK_MAX3 1 +#define PROP_EMISSIVEBLINK_VELOCITY3 4 +#define PROP_EMISSIONBLINKINGOFFSET3 0 +#define PROP_SCROLLINGEMISSION3 0 +#define PROP_EMISSIONSCROLLINGUSECURVE3 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR3 0 +#define PROP_EMISSIVESCROLL_WIDTH3 10 +#define PROP_EMISSIVESCROLL_VELOCITY3 10 +#define PROP_EMISSIVESCROLL_INTERVAL3 20 +#define PROP_EMISSIONAL3ENABLED 0 +#define PROP_EMISSIONAL3STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION3CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTBAND 0 +#define PROPM_END_EMISSION3OPTIONS 0 +#define PROPM_END_EMISSIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERUV 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERCOLORTHEMEINDEX 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_PATHING 0 +#define PROP_ENABLEPATHING 0 +#define PROP_PATHINGMAPUV 0 +#define PROP_PATHINGCOLORMAPUV 0 +#define PROP_PATHTYPER 0 +#define PROP_PATHTYPEG 0 +#define PROP_PATHTYPEB 0 +#define PROP_PATHCOLORRTHEMEINDEX 0 +#define PROP_PATHCOLORGTHEMEINDEX 0 +#define PROP_PATHCOLORBTHEMEINDEX 0 +#define PROPM_START_PATHAUDIOLINK 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDR 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDG 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDB 0 +#define PROPM_END_PATHAUDIOLINK 0 +#define PROPM_END_PATHING 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DEPTHFX 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHCOLORTOGGLE 0 +#define PROP_DEPTHCOLORBLENDMODE 0 +#define PROP_DEPTHTEXTUREUV 0 +#define PROP_DEPTHCOLORTHEMEINDEX 0 +#define PROP_DEPTHEMISSIONSTRENGTH 0 +#define PROP_DEPTHCOLORMINDEPTH 0 +#define PROP_DEPTHCOLORMAXDEPTH 1 +#define PROP_DEPTHCOLORMINVALUE 0 +#define PROP_DEPTHCOLORMAXVALUE 1 +#define PROP_DEPTHALPHATOGGLE 0 +#define PROP_DEPTHALPHAMINDEPTH 0 +#define PROP_DEPTHALPHAMAXDEPTH 1 +#define PROP_DEPTHALPHAMINVALUE 0 +#define PROP_DEPTHALPHAMAXVALUE 1 +#define PROPM_END_DEPTHFX 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALMAPUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROP_IRIDESCENCEHUESHIFTENABLED 0 +#define PROP_IRIDESCENCEHUESHIFTSPEED 0 +#define PROP_IRIDESCENCEHUESHIFT 0 +#define PROPM_START_IRIDESCENCEAUDIOLINK 0 +#define PROP_IRIDESCENCEAUDIOLINKEMISSIONBAND 0 +#define PROPM_END_IRIDESCENCEAUDIOLINK 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTGLYPHS +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 1 +#define PROP_TEXTFPSENABLED 1 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSCOLORTHEMEINDEX 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 1 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONCOLORTHEMEINDEX 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 1 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMECOLORTHEMEINDEX 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_AUDIOLINKCATEGORY 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKANIMTOGGLE 1 +#define PROP_DEBUGWAVEFORM 0 +#define PROP_DEBUGDFT 0 +#define PROP_DEBUGBASS 0 +#define PROP_DEBUGLOWMIDS 0 +#define PROP_DEBUGHIGHMIDS 0 +#define PROP_DEBUGTREBLE 0 +#define PROP_DEBUGCCCOLORS 0 +#define PROP_DEBUGCCSTRIP 0 +#define PROP_DEBUGCCLIGHTS 0 +#define PROP_DEBUGAUTOCORRELATOR 0 +#define PROP_DEBUGCHRONOTENSITY 0 +#define PROP_DEBUGVISUALIZERHELPBOX 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_START_ALDECALSPECTRUM 0 +#define PROP_ENABLEALDECAL 0 +#define PROP_ALDECALTYPE 0 +#define PROP_ALDECALUVMODE 0 +#define PROP_ALDECALUV 0 +#define PROP_ALUVROTATION 0 +#define PROP_ALUVROTATIONSPEED 0 +#define PROP_ALDECALLINEWIDTH 1 +#define PROP_ALDECALVOLUMESTEP 0 +#define PROP_ALDECALVOLUMECLIPMIN 0 +#define PROP_ALDECALVOLUMECLIPMAX 1 +#define PROP_ALDECALBANDSTEP 0 +#define PROP_ALDECALBANDCLIPMIN 0 +#define PROP_ALDECALBANDCLIPMAX 1 +#define PROP_ALDECALSHAPECLIP 0 +#define PROP_ALDECALSHAPECLIPVOLUMEWIDTH 0.5 +#define PROP_ALDECALSHAPECLIPBANDWIDTH 0.5 +#define PROP_ALDECALVOLUME 0.5 +#define PROP_ALDECALBASEBOOST 5 +#define PROP_ALDECALTREBLEBOOST 1 +#define PROP_ALDECALVOLUMECOLORSOURCE 1 +#define PROP_ALDECALLOWEMISSION 0 +#define PROP_ALDECALMIDEMISSION 0 +#define PROP_ALDECALHIGHEMISSION 0 +#define PROP_ALDECALBLENDTYPE 0 +#define PROP_ALDECALBLENDALPHA 1 +#define PROP_ALDECALCONTROLSALPHA 0 +#define PROPM_END_ALDECALSPECTRUM 0 +#define PROPM_MODIFIERCATEGORY 0 +#define PROPM_START_UVDISTORTION 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONUVTODISTORT 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONFLOWTEXTUREUV 0 +#define PROP_DISTORTIONFLOWTEXTURE1UV 0 +#define PROP_DISTORTIONSTRENGTH 0.03 +#define PROP_DISTORTIONSTRENGTH1 0.01 +#define PROPM_END_UVDISTORTION 0 +#define PROPM_START_UVPANOSPHERE 0 +#define PROP_STEREOENABLED 0 +#define PROP_PANOUSEBOTHEYES 1 +#define PROPM_END_UVPANOSPHERE 0 +#define PROPM_START_UVPOLAR 0 +#define PROP_POLARUV 0 +#define PROP_POLARRADIALSCALE 1 +#define PROP_POLARLENGTHSCALE 1 +#define PROP_POLARSPIRALPOWER 0 +#define PROPM_END_UVPOLAR 0 +#define PROPM_START_PARALLAX 1 +#define PROP_POIPARALLAX 1 +#define PROP_PARALLAXUV 0 +#define PROP_HEIGHTMAPUV 0 +#define PROP_HEIGHTSTRENGTH 0.1 +#define PROP_CURVATUREU 0 +#define PROP_CURVATUREV 0 +#define PROP_HEIGHTSTEPSMIN 10 +#define PROP_HEIGHTSTEPSMAX 128 +#define PROP_CURVFIX 1 +#define PROPM_END_PARALLAX 0 +#define PROPM_THIRDPARTYCATEGORY 0 +#define PROPM_POSTPROCESSING 0 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_PPHELP 0 +#define PROP_PPLIGHTINGMULTIPLIER 1 +#define PROP_PPLIGHTINGADDITION 0 +#define PROP_PPEMISSIONMULTIPLIER 1 +#define PROP_PPFINALCOLORMULTIPLIER 1 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POSTPROCESS 0 +#define PROP_POSTPROCESS 0 +#define PROP_PPMASKINVERT 0 +#define PROP_PPMASKUV 0 +#define PROP_PPLUTSTRENGTH 0 +#define PROP_PPHUE 0 +#define PROP_PPCONTRAST 1 +#define PROP_PPSATURATION 1 +#define PROP_PPBRIGHTNESS 1 +#define PROP_PPLIGHTNESS 0 +#define PROP_PPHDR 0 +#define PROPM_END_POSTPROCESS 0 +#define PROPM_RENDERINGCATEGORY 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_RENDERINGREDUCECLIPDISTANCE 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPENUM_FALLBACK 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 + + #pragma target 5.0 + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_BASE + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + uniform float4 _AudioTexture_TexelSize; + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + float _Mode; + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + #ifdef POI_PARALLAX + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + #endif + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + float _LightingDebugVisualize; + float _IgnoreFog; + float _RenderingReduceClipDistance; + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + float _AlphaDithering; + float _AlphaDitherGradient; + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + float _LightingStandardSmoothness; + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP)|| !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + struct PoiMesh + { + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + float2 uv[8]; + float2 parallaxUV; + }; + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + }; + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + struct PoiLight + { + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + }; + struct PoiVertexLights + { + float3 direction; + float3 color; + float attenuation; + }; + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + float R0 = max(0, L0); + float3 R1 = 0.5f * L1; + float lenR1 = length(R1); + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + float p = 1.0f + 2.0f * lenR1 / R0; + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + float poiMax(float2 i) + { + return max(i.x, i.y); + } + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + float blendDarken(float base, float blend) + { + return min(blend, base); + } + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + float blendLighten(float base, float blend) + { + return max(blend, base); + } + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + float blendLinearBurn(float base, float blend) + { + return max(base + blend - 1.0, 0.0); + } + float3 blendLinearBurn(float3 base, float3 blend) + { + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + float blendLinearDodge(float base, float blend) + { + return min(base + blend, 1.0); + } + float3 blendLinearDodge(float3 base, float3 blend) + { + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + float hue = hsv.x + Offset; + hsv.x = frac(hue); + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + static const float Epsilon = 1e-10; + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + float3 RGBtoHCV(in float3 RGB) + { + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + float3 HCYtoRGB(in float3 HCY) + { + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + float3 RGBtoHCY(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + return rgb; + } + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + return uv; + } + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + return 0.5 * log2(delta_max_sqr); + } + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + return float4(result1 + result2); + } + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + float4 inVecQ = quaternion_from_vector(inVec); + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + return rotated; + } + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + return srcColor; + } + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + o.pos.z += _Offset_Z * - 0.01; + #else + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + if (float(0)) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + #if defined(GRAIN) + float4 worldDirection; + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = float4(1,1,1,1); + poiMods.globalColorTheme[1] = float4(1,1,1,1); + poiMods.globalColorTheme[2] = float4(1,1,1,1); + poiMods.globalColorTheme[3] = float4(1,1,1,1); + } + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[float(0)] - float4(0.5,0.5,0,0); + float radius = length(delta) * 2 * float(1); + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * float(1); + return float2(radius, angle + distance(poiMesh.uv[float(0)], float4(0.5,0.5,0,0)) * float(0)); + } + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, float(1)) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), float(0)); + } + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + float(1)); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[float(0)] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + if (float(0) == 0) poiMesh.uv[0] = offset; + if (float(0) == 1) poiMesh.uv[1] = offset; + if (float(0) == 2) poiMesh.uv[2] = offset; + if (float(0) == 3) poiMesh.uv[3] = offset; + if (float(0) == 4) poiMesh.uv[4] = offset; + if (float(0) == 5) poiMesh.uv[5] = offset; + if (float(0) == 6) poiMesh.uv[6] = offset; + if (float(0) == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + float(0)); + if (float(0)) + { + float3 position = float(1) ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(float(0), float(1), smoothstep(float(0), float(0), distance(position, poiCam.worldPos))); + } + if (float(1)) + { + float holoRim = saturate(1 - smoothstep(min(float(0.5), float(0.5)), float(0.5), poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, float(0))); + poiFragData.alpha *= float(0) ?1 - holoRim : holoRim; + } + if (float(0)) + { + half cameraAngleMin = float(45) / 180; + half cameraAngleMax = float(90) / 180; + half modelAngleMin = float(45) / 180; + half modelAngleMax = float(90) / 180; + float3 pos = float(0) == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(float4(0,0,1,1)))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (float(0) == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, float(0)); + } + else if (float(0) == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, float(0)); + } + else if (float(0) == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, float(0)); + } + } + } + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (float(0)) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * float(0.1)); + } + } + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + + if (float(0) == 1) + { + + if (float(0)) + { + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * float4(0.25,0.25,4,4).zw)) * float(0.25); + poiFragData.alpha = (poiFragData.alpha - float(0.5)) / max(fwidth(poiFragData.alpha), 0.0001) + float(0.5); + } + } + } + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), float(1)); + poiFragData.baseColor *= lerp(1, vertCol, float(0)); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, float(0)); + } + #ifdef VIGNETTE_MASKED + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #define CLOTHMODE HARD + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + float a2 = roughness * roughness; + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + return v; + } + float D_GGX(float roughness, float NoH) + { + float oneMinusNoHSquared = 1.0 - NoH * NoH; + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + float D_Charlie(float roughness, float NoH) + { + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + float V_Neubelt(float NoV, float NoL) + { + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + float F_Schlick(float3 f0, float f90, float VoH) + { + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + float F_Schlick(float3 f0, float VoH) { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + float Fd_Wrap(float NoL, float w) { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + return (D * V) * F; + } + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + float3 reflDir = reflect(-poiCam.viewDir, normal); + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + #if UNITY_SPECCUBE_BLENDING + + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), float(0)); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + x2 += L2_0; + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + float3 GetSHDirectionL1() + { + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = float(0.5) - float(0.0001); + float firstColorFeatherStep = float(0) - float(0.0001); + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), float(0)); + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, float(0)); + firstShadeMap.rgb *= float4(1,1,1,1).rgb; //* lighColor + secondShadeMap.rgb *= float4(1,1,1,1).rgb; //* LightColor; + float shadowMask = 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (float(0.5) - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (float(0) - firstColorFeatherStep) * (shadowMask)); + mainShadowMask *= poiLight.shadowMask; + firstSecondShadowMask *= poiLight.shadowMask; + if (float(0) == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1-mainShadowMask; + } + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - float(0); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + return indirectLight; + } + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + float shadowStrength = float(1) * poiLight.shadowMask; + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - float(0)) / saturate(float(0.5) - float(0) + fwidth(poiLight.lightMap))); + poiLight.finalLighting = lerp((float4(1,1,1,1) * lerp(poiLight.indirectColor, poiLight.directColor, float(0)) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, float(0), poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + #ifdef _LIGHTINGMODE_CLOTH + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * float(0.5)); + float reflectance = float(0.5) * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r *float(0), 2) * ClothMetallic(clothmask); + roughness = float(0) == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (float(0.5)); + float metallic = pow(float(0), 2); + float reflectance = float(0.5); + float clothmask = 1; + #endif + float perceptualRoughness = pow(roughness,2); + float clampedRoughness = max(0.002, perceptualRoughness); + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + float3 dfg = SampleDFG(poiLight.nDotV ,perceptualRoughness); + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3,0.59,0.11) + float wrap = float(0); + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, float(0))); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - float(0)) / saturate(float(0.5) - float(0) + fwidth(poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float4(1,1,1,1) * lerp(poiLight.indirectColor, 1, float(0)), float3(1, 1, 1), saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - float(1)); + #endif + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + float subsurface = 1; + float skinScattering = saturate(subsurface * float(1) * 2); + half3 absorption = exp((1.0h - subsurface) * float4(-8,-40,-64,0).rgb); + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, float(0.7))); + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * float4(1,1,1,1), float4(1,1,1,1), float(0)) + (sss * poiLight.directColor), poiLight.directColor); + #endif + #endif + #ifdef UNITY_PASS_FORWARDADD + if (float(1) == 0) // Realistic + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (float(1) == 1) // Toon + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = float(0.5); + #endif + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + #endif + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + if (float(1) == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + } + if (float(1) == 1) // Toon + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * float(0.5) * poiLight.vAttenuation[index], smoothstep(float(0), float(0.5), poiLight.vDotNL[index])) * poiLight.detailShadow; + } + if (float(1) == 2) //if(float(1) == 2) // Wrapped + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * float(0.5) * poiLight.vAttenuation[index], smoothstep(float(0), float(0.5), poiLight.vDotNL[index])) * poiLight.detailShadow; + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + float3 normal0 = poiMesh.normals[float(1)]; + #ifdef POI_MATCAP0 + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[float(1)], poiMesh, _Matcap0NormalMap, float4(3,3,0,0), float4(0,0,0,0), float(0), float(1)); + #endif + #endif + switch(float(1)) + { + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + matcapUV = noSknewViewNormal.rg * float(0.43) + 0.5; + break; + } + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * float(0.43) + 0.5; + break; + } + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * float(0.43) + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #else + matcap = float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #endif + matcap.rgb *= float(1); + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + matcapMask = 1; + #endif + if (float(0)) + { + matcapMask = 1 - matcapMask; + } + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * float(0)); + if (float(0)) + { + matcap.rgb = hueShift(matcap.rgb, float(0) + _Time.x * float(0)); + } + blendMatcap(poiLight, poiFragData, float(0), float(0), float(0), matcap, matcapMask, float(0), float(0) + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + #ifdef COLOR_GRADING_HDR_3D + float3 normal1 = poiMesh.normals[float(1)]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[float(1)], poiMesh, _Matcap1NormalMap, float4(3,3,0,0), float4(0,0,0,0), float(0), float(1)); + #endif + #endif + matcapUV = 0; + switch(float(1)) + { + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + matcapUV = noSknewViewNormal.rg * float(0.43) + 0.5; + break; + } + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * float(0.43) + 0.5; + break; + } + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * float(0.43) + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #else + matcap2 = float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #endif + matcap2.rgb *= float(1); + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + matcap2Mask = 1; + #endif + if (float(0)) + { + matcap2Mask = 1 - matcap2Mask; + } + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * float(0)); + if (float(0)) + { + matcap2.rgb = hueShift(matcap2.rgb, float(0) + _Time.x * float(0)); + } + blendMatcap(poiLight, poiFragData, float(1), float(0), float(0), matcap2, matcap2Mask, float(0), float(0) + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) + { + float glowInTheDarkMultiplier = 1; + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; + } + float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) + { + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.x + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; + } + float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) + { + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.x + offset) * blinkVelocity) * amplitude + base; + } + void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) + { + } + void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) + { + } + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[float(0)].xy, float4(10,10,0,0)) + _Time.x * float4(0,0,0,0)); + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)), float(1)); + poiMesh.tangentSpaceNormal = mainNormal; + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + calculateGlobalThemes(poiMods); + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.occlusion = lerp(1, AOMaps.r, float(1)) * lerp(1, AOMaps.g, float(0)) * lerp(1, AOMaps.b, float(0)) * lerp(1, AOMaps.a, float(0)); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.detailShadow = lerp(1, DetailShadows.r, float(1)) * lerp(1, DetailShadows.g, float(0)) * lerp(1, DetailShadows.b, float(0)) * lerp(1, DetailShadows.a, float(0)); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.shadowMask = lerp(1, ShadowMasks.r, float(1)) * lerp(1, ShadowMasks.g, float(0)) * lerp(1, ShadowMasks.b, float(0)) * lerp(1, ShadowMasks.a, float(0)); + #else + poiLight.shadowMask = 1; + #endif + #ifdef UNITY_PASS_FORWARDBASE + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + poiLight.vColor[index] = unity_LightColor[index].rgb; + if (float(0) == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / float(1))); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + if (float(1) == 0) // Poi Custom Light Color + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], float(0)), 1)); + } + if (float(1) == 1) // More standard approach to light color + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + if (float(1) == 2) // UTS style + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * float(1), max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * float(1))); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + float lightMapMode = float(0); + if (float(0) == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (float(0) == 1 || float(0) == 2) + { + if (float(0) == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz;; + } + if (float(0) == 2) + { + poiLight.direction = float4(0,0,0,1); + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + if (float(0) == 3) // UTS + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = float(0); + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + if (lightMapMode == 0) // Poi special light map + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + if (lightMapMode == 1) // Normalized nDotL + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + if (lightMapMode == 2) // Saturated nDotL + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / float(0)))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / float(0)))); + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), float(0)); + if (float(1)) + { + poiLight.directColor = min(poiLight.directColor, float(1)); + poiLight.indirectColor = min(poiLight.indirectColor, float(1)); + } + if (float(0)) + { + poiLight.directColor = poiThemeColor(poiMods, float4(1,1,1,1), float(0)); + } + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * float(1), 0); + poiLight.directColor = max(poiLight.directColor + float(0), 0); + poiLight.indirectColor = max(poiLight.indirectColor * float(1), 0); + poiLight.indirectColor = max(poiLight.indirectColor + float(0), 0); + #endif + #endif + #ifdef UNITY_PASS_FORWARDADD + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = float(0) ? min(float(1), _LightColor0.rgb) : _LightColor0.rgb; + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, float(0.5)); + #endif + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)); + poiFragData.alpha = mainTexture.a * float4(1,1,1,1).a; + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)).r; + if (float(0)) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + poiFragData.alpha *= alphaMask; + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + applyVertexColor(poiFragData, poiMesh); + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + if (float(0)) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; + #endif + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); + #endif + if (float(0) == 1) + { + clip(poiFragData.alpha - float(0.5)); + } + if (float(0) == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + poiFragData.alpha = float(0) ? 1 : poiFragData.alpha; + ApplyAlphaToCoverage(poiFragData, poiMesh); + applyDithering(poiFragData, poiCam); + #ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * float(1), 0); + poiFragData.finalColor = max(poiFragData.finalColor * float(1), 0); + #endif + if (float(0) == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + if (float(0) == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + } + ENDCG + } + Pass + { + Tags { "LightMode" = "ForwardAdd" } + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + ZWrite Off + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + CGPROGRAM +#define OPTIMIZER_ENABLED +#define COLOR_GRADING_HDR_3D +#define POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE +#define POI_LIGHT_DATA_ADDITIVE_ENABLE +#define POI_MATCAP0 +#define POI_MATCAP0_CUSTOM_NORMAL +#define POI_MATCAP1_CUSTOM_NORMAL +#define POI_PARALLAX +#define POI_VERTEXLIGHT_ON +#define VIGNETTE_MASKED +#define _LIGHTINGMODE_WRAPPED +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 0 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINCATEGORY 0 +#define PROP_COLORTHEMEINDEX 0 +#define PROP_MAINTEX +#define PROP_MAINTEXUV 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROP_CUTOFF 0.5 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTOGGLE 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROP_MAINHUESHIFTREPLACE 1 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_MAINHUEALCTENABLED 0 +#define PROP_MAINALHUESHIFTBAND 0 +#define PROP_MAINALHUESHIFTCTINDEX 0 +#define PROP_MAINHUEALMOTIONSPEED 1 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_ALPHA 1 +#define PROP_ALPHAFORCEOPAQUE 0 +#define PROP_ALPHAMOD 0 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHATOCOVERAGE 0 +#define PROP_ALPHASHARPENEDA2C 0 +#define PROP_ALPHAMIPSCALE 0.25 +#define PROP_ALPHADITHERING 0 +#define PROP_ALPHADITHERGRADIENT 0.1 +#define PROP_ALPHADISTANCEFADE 0 +#define PROP_ALPHADISTANCEFADETYPE 1 +#define PROP_ALPHADISTANCEFADEMINALPHA 0 +#define PROP_ALPHADISTANCEFADEMAXALPHA 1 +#define PROP_ALPHADISTANCEFADEMIN 0 +#define PROP_ALPHADISTANCEFADEMAX 0 +#define PROP_ALPHAFRESNEL 1 +#define PROP_ALPHAFRESNELALPHA 0 +#define PROP_ALPHAFRESNELSHARPNESS 0.5 +#define PROP_ALPHAFRESNELWIDTH 0.5 +#define PROP_ALPHAFRESNELINVERT 0 +#define PROP_ALPHAANGULAR 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROP_ALPHAAUDIOLINKENABLED 0 +#define PROP_ALPHAAUDIOLINKADDBAND 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTINTTHEMEINDEX 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTMASKUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROP_VERTEXAUDIOLINKENABLED 0 +#define PROP_VERTEXLOCALTRANSLATIONALBAND 0 +#define PROP_VERTEXLOCALROTATIONALBANDX 0 +#define PROP_VERTEXLOCALROTATIONALBANDY 0 +#define PROP_VERTEXLOCALROTATIONALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDX 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEX 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDY 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEY 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEZ 0 +#define PROP_VERTEXLOCALSCALEALBAND 0 +#define PROP_VERTEXWORLDTRANSLATIONALBAND 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBAND 0 +#define PROP_VERTEXROUNDINGRANGEBAND 0 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORINGLINEARSPACE 1 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACECOLORTHEMEINDEX 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROP_BACKFACEALPHA 1 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEMASKUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEREPLACEALPHA 0 +#define PROP_BACKFACEHUESHIFTENABLED 0 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEHUESHIFTSPEED 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_REDCOLORTHEMEINDEX 0 +#define PROP_REDTEXUREUV 0 +#define PROP_GREENCOLORTHEMEINDEX 0 +#define PROP_GREENTEXTUREUV 0 +#define PROP_BLUECOLORTHEMEINDEX 0 +#define PROP_BLUETEXTUREUV 0 +#define PROP_ALPHACOLORTHEMEINDEX 0 +#define PROP_ALPHATEXTUREUV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROP_RGBNORMALAUV 0 +#define PROP_RGBNORMALASCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECAL0MASKCHANNEL 0 +#define PROP_DECALCOLORTHEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALOVERIDEALPHA 0 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROP_DECAL0HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECAL1MASKCHANNEL 1 +#define PROP_DECALCOLOR1THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALOVERIDEALPHA1 0 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROP_DECAL1HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECAL2MASKCHANNEL 2 +#define PROP_DECALCOLOR2THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALOVERIDEALPHA2 0 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROP_DECAL2HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECAL3MASKCHANNEL 3 +#define PROP_DECALCOLOR3THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALOVERIDEALPHA3 0 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROP_DECAL3HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3SIDEBAND 0 +#define PROP_AUDIOLINKDECAL3ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROP_AUDIOLINKDECALX 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_GLOBALTHEMES 0 +#define PROPM_END_GLOBALTHEMES 0 +#define PROPM_LIGHTINGCATEGORY 1 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_LIGHTINGAOMAPSUV 0 +#define PROP_LIGHTDATAAOSTRENGTHR 1 +#define PROP_LIGHTDATAAOSTRENGTHG 0 +#define PROP_LIGHTDATAAOSTRENGTHB 0 +#define PROP_LIGHTDATAAOSTRENGTHA 0 +#define PROP_LIGHTINGDETAILSHADOWMAPSUV 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHR 1 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHG 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHB 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHA 0 +#define PROP_LIGHTINGSHADOWMASKSUV 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHR 1 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHG 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHB 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHA 0 +#define PROP_LIGHTINGCOLORMODE 1 +#define PROP_LIGHTINGMAPMODE 0 +#define PROP_LIGHTINGDIRECTIONMODE 0 +#define PROP_LIGHTINGFORCECOLORENABLED 0 +#define PROP_LIGHTINGFORCEDCOLORTHEMEINDEX 0 +#define PROP_UNLIT_INTENSITY 1 +#define PROP_LIGHTINGCAPENABLED 1 +#define PROP_LIGHTINGCAP 1 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINLIGHTINDIBRIGHTNESS 0 +#define PROP_LIGHTINGINDIRECTUSESNORMALS 0 +#define PROP_LIGHTINGCASTEDSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEENABLE 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_LIGHTINGADDITIVELIMITED 0 +#define PROP_LIGHTINGADDITIVELIMIT 1 +#define PROP_LIGHTINGADDITIVEMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGVERTEXLIGHTINGENABLED 1 +#define PROP_LIGHTDATADEBUGENABLED 0 +#define PROP_LIGHTINGDEBUGVISUALIZE 0 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POISHADING 0 +#define PROP_SHADINGENABLED 1 +#define PROP_LIGHTINGMODE 2 +#define PROP_TOONRAMP +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_LIGHTINGGRADIENTSTARTWRAP 0 +#define PROP_LIGHTINGGRADIENTENDWRAP 0.5 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_SHADINGSHADEMAPBLENDTYPE 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_SKINLUT +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_CLOTHDFG +#define PROP_CLOTHMETALLICSMOOTHNESSMAPINVERT 0 +#define PROP_CLOTHMETALLICSMOOTHNESSMAPUV 0 +#define PROP_CLOTHLERP 0 +#define PROP_CLOTHMETALLIC 0 +#define PROP_CLOTHREFLECTANCE 0.5 +#define PROP_CLOTHSMOOTHNESS 0.5 +#define PROP_SHADOWSTRENGTH 1 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROPM_END_POISHADING 0 +#define PROPM_START_MATCAP 1 +#define PROP_MATCAPENABLE 1 +#define PROP_MATCAPUVMODE 1 +#define PROP_MATCAPCOLORTHEMEINDEX 0 +#define PROP_MATCAP +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 0 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPALPHAOVERRIDE 0 +#define PROP_MATCAPNORMAL 1 +#define PROP_MATCAP0CUSTOMNORMAL 1 +#define PROP_MATCAP0NORMALMAP +#define PROP_MATCAP0NORMALMAPUV 0 +#define PROP_MATCAP0NORMALMAPSCALE 1 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 1 +#define PROP_MATCAP2ENABLE 1 +#define PROP_MATCAP2UVMODE 1 +#define PROP_MATCAP2COLORTHEMEINDEX 0 +#define PROP_MATCAP2 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 1 +#define PROP_MATCAP2ALPHAOVERRIDE 0 +#define PROP_MATCAP2NORMAL 1 +#define PROP_MATCAP1CUSTOMNORMAL 1 +#define PROP_MATCAP1NORMALMAP +#define PROP_MATCAP1NORMALMAPUV 0 +#define PROP_MATCAP1NORMALMAPSCALE 1 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_CUBEMAP 0 +#define PROP_CUBEMAPENABLED 0 +#define PROP_CUBEMAPUVMODE 1 +#define PROP_CUBEMAPCOLORTHEMEINDEX 0 +#define PROP_CUBEMAPMASKUV 0 +#define PROP_CUBEMAPMASKINVERT 0 +#define PROP_CUBEMAPEMISSIONSTRENGTH 0 +#define PROP_CUBEMAPINTENSITY 1 +#define PROP_CUBEMAPLIGHTMASK 0 +#define PROP_CUBEMAPREPLACE 1 +#define PROP_CUBEMAPMULTIPLY 0 +#define PROP_CUBEMAPADD 0 +#define PROP_CUBEMAPNORMAL 1 +#define PROP_CUBEMAPHUESHIFTENABLED 0 +#define PROP_CUBEMAPHUESHIFTSPEED 0 +#define PROP_CUBEMAPHUESHIFT 0 +#define PROPM_END_CUBEMAP 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMLIGHTCOLORTHEMEINDEX 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.25 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_BRDF 0 +#define PROP_MOCHIEBRDF 0 +#define PROP_MOCHIEREFLECTIONSTRENGTH 1 +#define PROP_MOCHIESPECULARSTRENGTH 1 +#define PROP_MOCHIEMETALLICMULTIPLIER 0 +#define PROP_MOCHIEROUGHNESSMULTIPLIER 1 +#define PROP_MOCHIEREFLECTIONTINTTHEMEINDEX 0 +#define PROP_MOCHIESPECULARTINTTHEMEINDEX 0 +#define PROP_MOCHIEMETALLICMAPINVERT 0 +#define PROP_MOCHIEMETALLICMAPUV 0 +#define PROP_MOCHIEROUGHNESSMAPINVERT 0 +#define PROP_MOCHIEROUGHNESSMAPUV 0 +#define PROP_MOCHIEREFLECTIONMASKINVERT 0 +#define PROP_MOCHIEREFLECTIONMASKUV 0 +#define PROP_MOCHIESPECULARMASKINVERT 0 +#define PROP_MOCHIESPECULARMASKUV 0 +#define PROP_MOCHIEFORCEFALLBACK 0 +#define PROP_MOCHIELITFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATSMOOTHNESSMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOATMASKUV 0 +#define PROP_CLEARCOATNORMAL 0 +#define PROP_CLEARCOATTINTTHEMEINDEX 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATSMOOTHNESS 0 +#define PROP_CLEARCOATSAMPLEWORLD 1 +#define PROP_CLEARCOATFORCELIGHTING 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_STYLIZEDSPEC 0 +#define PROP_STYLIZEDSPECULAR 0 +#define PROP_HIGHCOLOR_TEXUV 0 +#define PROP_HIGHCOLORTHEMEINDEX 0 +#define PROP_SET_HIGHCOLORMASKUV 0 +#define PROP_TWEAK_HIGHCOLORMASKLEVEL 0 +#define PROP_IS_SPECULARTOHIGHCOLOR 0 +#define PROP_IS_BLENDADDTOHICOLOR 0 +#define PROP_STYLIZEDSPECULARSTRENGTH 1 +#define PROP_USELIGHTCOLOR 1 +#define PROP_HIGHCOLOR_POWER 0.2 +#define PROP_STYLIZEDSPECULARFEATHER 0 +#define PROP_LAYER1STRENGTH 1 +#define PROP_LAYER2SIZE 0 +#define PROP_STYLIZEDSPECULAR2FEATHER 0 +#define PROP_LAYER2STRENGTH 0 +#define PROPM_END_STYLIZEDSPEC 0 +#define PROPM_SPECIALFXCATEGORY 1 +#define PROPM_START_UDIMDISCARDOPTIONS 0 +#define PROP_ENABLEUDIMDISCARDOPTIONS 0 +#define PROP_UDIMDISCARDUV 0 +#define PROP_UDIMDISCARDMODE 1 +#define PROPM_END_UDIMDISCARDOPTIONS 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGECOLORTHEMEINDEX 0 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETEXTURECOLORTHEMEINDEX 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKCOLORTHEMEINDEX 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_FLIPBOOKCHRONOTENSITYENABLED 0 +#define PROP_FLIPBOOKCHRONOTENSITYBAND 0 +#define PROP_FLIPBOOKCHRONOTENSITYSPEED 1 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_EMISSIONS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE0 0 +#define PROP_EMISSIONCOLORTHEMEINDEX 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMASK +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 1 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROP_EMISSIONAL0ENABLED 0 +#define PROP_EMISSIONAL0STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION0CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTBAND 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONREPLACE1 1 +#define PROP_EMISSIONCOLOR1THEMEINDEX 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMASK1 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 1 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROP_EMISSIONAL1ENABLED 0 +#define PROP_EMISSIONAL1STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION1CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_EMISSION2OPTIONS 0 +#define PROP_ENABLEEMISSION2 0 +#define PROP_EMISSIONREPLACE2 1 +#define PROP_EMISSIONCOLOR2THEMEINDEX 0 +#define PROP_EMISSIONMAP2UV 0 +#define PROP_EMISSIONBASECOLORASMAP2 0 +#define PROP_EMISSIONMASK2 +#define PROP_EMISSIONMASK2UV 0 +#define PROP_EMISSIONSTRENGTH2 1 +#define PROP_EMISSIONHUESHIFTENABLED2 0 +#define PROP_EMISSIONHUESHIFT2 0 +#define PROP_EMISSIONHUESHIFTSPEED2 0 +#define PROP_EMISSIONCENTEROUTENABLED2 0 +#define PROP_EMISSIONCENTEROUTSPEED2 5 +#define PROP_ENABLEGITDEMISSION2 0 +#define PROP_GITDEWORLDORMESH2 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER2 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER2 0 +#define PROP_GITDEMINLIGHT2 0 +#define PROP_GITDEMAXLIGHT2 1 +#define PROP_EMISSIONBLINKINGENABLED2 0 +#define PROP_EMISSIVEBLINK_MIN2 0 +#define PROP_EMISSIVEBLINK_MAX2 1 +#define PROP_EMISSIVEBLINK_VELOCITY2 4 +#define PROP_EMISSIONBLINKINGOFFSET2 0 +#define PROP_SCROLLINGEMISSION2 0 +#define PROP_EMISSIONSCROLLINGUSECURVE2 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR2 0 +#define PROP_EMISSIVESCROLL_WIDTH2 10 +#define PROP_EMISSIVESCROLL_VELOCITY2 10 +#define PROP_EMISSIVESCROLL_INTERVAL2 20 +#define PROP_EMISSIONAL2ENABLED 0 +#define PROP_EMISSIONAL2STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION2CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTBAND 0 +#define PROPM_END_EMISSION2OPTIONS 0 +#define PROPM_START_EMISSION3OPTIONS 0 +#define PROP_ENABLEEMISSION3 0 +#define PROP_EMISSIONREPLACE3 1 +#define PROP_EMISSIONCOLOR3THEMEINDEX 0 +#define PROP_EMISSIONMAP3UV 0 +#define PROP_EMISSIONBASECOLORASMAP3 0 +#define PROP_EMISSIONMASK3 +#define PROP_EMISSIONMASK3UV 0 +#define PROP_EMISSIONSTRENGTH3 1 +#define PROP_EMISSIONHUESHIFTENABLED3 0 +#define PROP_EMISSIONHUESHIFT3 0 +#define PROP_EMISSIONHUESHIFTSPEED3 0 +#define PROP_EMISSIONCENTEROUTENABLED3 0 +#define PROP_EMISSIONCENTEROUTSPEED3 5 +#define PROP_ENABLEGITDEMISSION3 0 +#define PROP_GITDEWORLDORMESH3 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER3 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER3 0 +#define PROP_GITDEMINLIGHT3 0 +#define PROP_GITDEMAXLIGHT3 1 +#define PROP_EMISSIONBLINKINGENABLED3 0 +#define PROP_EMISSIVEBLINK_MIN3 0 +#define PROP_EMISSIVEBLINK_MAX3 1 +#define PROP_EMISSIVEBLINK_VELOCITY3 4 +#define PROP_EMISSIONBLINKINGOFFSET3 0 +#define PROP_SCROLLINGEMISSION3 0 +#define PROP_EMISSIONSCROLLINGUSECURVE3 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR3 0 +#define PROP_EMISSIVESCROLL_WIDTH3 10 +#define PROP_EMISSIVESCROLL_VELOCITY3 10 +#define PROP_EMISSIVESCROLL_INTERVAL3 20 +#define PROP_EMISSIONAL3ENABLED 0 +#define PROP_EMISSIONAL3STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION3CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTBAND 0 +#define PROPM_END_EMISSION3OPTIONS 0 +#define PROPM_END_EMISSIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERUV 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERCOLORTHEMEINDEX 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_PATHING 0 +#define PROP_ENABLEPATHING 0 +#define PROP_PATHINGMAPUV 0 +#define PROP_PATHINGCOLORMAPUV 0 +#define PROP_PATHTYPER 0 +#define PROP_PATHTYPEG 0 +#define PROP_PATHTYPEB 0 +#define PROP_PATHCOLORRTHEMEINDEX 0 +#define PROP_PATHCOLORGTHEMEINDEX 0 +#define PROP_PATHCOLORBTHEMEINDEX 0 +#define PROPM_START_PATHAUDIOLINK 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDR 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDG 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDB 0 +#define PROPM_END_PATHAUDIOLINK 0 +#define PROPM_END_PATHING 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DEPTHFX 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHCOLORTOGGLE 0 +#define PROP_DEPTHCOLORBLENDMODE 0 +#define PROP_DEPTHTEXTUREUV 0 +#define PROP_DEPTHCOLORTHEMEINDEX 0 +#define PROP_DEPTHEMISSIONSTRENGTH 0 +#define PROP_DEPTHCOLORMINDEPTH 0 +#define PROP_DEPTHCOLORMAXDEPTH 1 +#define PROP_DEPTHCOLORMINVALUE 0 +#define PROP_DEPTHCOLORMAXVALUE 1 +#define PROP_DEPTHALPHATOGGLE 0 +#define PROP_DEPTHALPHAMINDEPTH 0 +#define PROP_DEPTHALPHAMAXDEPTH 1 +#define PROP_DEPTHALPHAMINVALUE 0 +#define PROP_DEPTHALPHAMAXVALUE 1 +#define PROPM_END_DEPTHFX 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALMAPUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROP_IRIDESCENCEHUESHIFTENABLED 0 +#define PROP_IRIDESCENCEHUESHIFTSPEED 0 +#define PROP_IRIDESCENCEHUESHIFT 0 +#define PROPM_START_IRIDESCENCEAUDIOLINK 0 +#define PROP_IRIDESCENCEAUDIOLINKEMISSIONBAND 0 +#define PROPM_END_IRIDESCENCEAUDIOLINK 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTGLYPHS +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 1 +#define PROP_TEXTFPSENABLED 1 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSCOLORTHEMEINDEX 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 1 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONCOLORTHEMEINDEX 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 1 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMECOLORTHEMEINDEX 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_AUDIOLINKCATEGORY 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKANIMTOGGLE 1 +#define PROP_DEBUGWAVEFORM 0 +#define PROP_DEBUGDFT 0 +#define PROP_DEBUGBASS 0 +#define PROP_DEBUGLOWMIDS 0 +#define PROP_DEBUGHIGHMIDS 0 +#define PROP_DEBUGTREBLE 0 +#define PROP_DEBUGCCCOLORS 0 +#define PROP_DEBUGCCSTRIP 0 +#define PROP_DEBUGCCLIGHTS 0 +#define PROP_DEBUGAUTOCORRELATOR 0 +#define PROP_DEBUGCHRONOTENSITY 0 +#define PROP_DEBUGVISUALIZERHELPBOX 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_START_ALDECALSPECTRUM 0 +#define PROP_ENABLEALDECAL 0 +#define PROP_ALDECALTYPE 0 +#define PROP_ALDECALUVMODE 0 +#define PROP_ALDECALUV 0 +#define PROP_ALUVROTATION 0 +#define PROP_ALUVROTATIONSPEED 0 +#define PROP_ALDECALLINEWIDTH 1 +#define PROP_ALDECALVOLUMESTEP 0 +#define PROP_ALDECALVOLUMECLIPMIN 0 +#define PROP_ALDECALVOLUMECLIPMAX 1 +#define PROP_ALDECALBANDSTEP 0 +#define PROP_ALDECALBANDCLIPMIN 0 +#define PROP_ALDECALBANDCLIPMAX 1 +#define PROP_ALDECALSHAPECLIP 0 +#define PROP_ALDECALSHAPECLIPVOLUMEWIDTH 0.5 +#define PROP_ALDECALSHAPECLIPBANDWIDTH 0.5 +#define PROP_ALDECALVOLUME 0.5 +#define PROP_ALDECALBASEBOOST 5 +#define PROP_ALDECALTREBLEBOOST 1 +#define PROP_ALDECALVOLUMECOLORSOURCE 1 +#define PROP_ALDECALLOWEMISSION 0 +#define PROP_ALDECALMIDEMISSION 0 +#define PROP_ALDECALHIGHEMISSION 0 +#define PROP_ALDECALBLENDTYPE 0 +#define PROP_ALDECALBLENDALPHA 1 +#define PROP_ALDECALCONTROLSALPHA 0 +#define PROPM_END_ALDECALSPECTRUM 0 +#define PROPM_MODIFIERCATEGORY 0 +#define PROPM_START_UVDISTORTION 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONUVTODISTORT 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONFLOWTEXTUREUV 0 +#define PROP_DISTORTIONFLOWTEXTURE1UV 0 +#define PROP_DISTORTIONSTRENGTH 0.03 +#define PROP_DISTORTIONSTRENGTH1 0.01 +#define PROPM_END_UVDISTORTION 0 +#define PROPM_START_UVPANOSPHERE 0 +#define PROP_STEREOENABLED 0 +#define PROP_PANOUSEBOTHEYES 1 +#define PROPM_END_UVPANOSPHERE 0 +#define PROPM_START_UVPOLAR 0 +#define PROP_POLARUV 0 +#define PROP_POLARRADIALSCALE 1 +#define PROP_POLARLENGTHSCALE 1 +#define PROP_POLARSPIRALPOWER 0 +#define PROPM_END_UVPOLAR 0 +#define PROPM_START_PARALLAX 1 +#define PROP_POIPARALLAX 1 +#define PROP_PARALLAXUV 0 +#define PROP_HEIGHTMAPUV 0 +#define PROP_HEIGHTSTRENGTH 0.1 +#define PROP_CURVATUREU 0 +#define PROP_CURVATUREV 0 +#define PROP_HEIGHTSTEPSMIN 10 +#define PROP_HEIGHTSTEPSMAX 128 +#define PROP_CURVFIX 1 +#define PROPM_END_PARALLAX 0 +#define PROPM_THIRDPARTYCATEGORY 0 +#define PROPM_POSTPROCESSING 0 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_PPHELP 0 +#define PROP_PPLIGHTINGMULTIPLIER 1 +#define PROP_PPLIGHTINGADDITION 0 +#define PROP_PPEMISSIONMULTIPLIER 1 +#define PROP_PPFINALCOLORMULTIPLIER 1 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POSTPROCESS 0 +#define PROP_POSTPROCESS 0 +#define PROP_PPMASKINVERT 0 +#define PROP_PPMASKUV 0 +#define PROP_PPLUTSTRENGTH 0 +#define PROP_PPHUE 0 +#define PROP_PPCONTRAST 1 +#define PROP_PPSATURATION 1 +#define PROP_PPBRIGHTNESS 1 +#define PROP_PPLIGHTNESS 0 +#define PROP_PPHDR 0 +#define PROPM_END_POSTPROCESS 0 +#define PROPM_RENDERINGCATEGORY 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_RENDERINGREDUCECLIPDISTANCE 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPENUM_FALLBACK 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 + + #pragma target 5.0 + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_instancing + #pragma multi_compile_fog + #define POI_PASS_ADD + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + uniform float4 _AudioTexture_TexelSize; + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + float _Mode; + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + #ifdef POI_PARALLAX + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + #endif + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + float _LightingDebugVisualize; + float _IgnoreFog; + float _RenderingReduceClipDistance; + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + float _AlphaDithering; + float _AlphaDitherGradient; + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + float _LightingStandardSmoothness; + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP)|| !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + struct PoiMesh + { + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + float2 uv[8]; + float2 parallaxUV; + }; + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + }; + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + struct PoiLight + { + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + }; + struct PoiVertexLights + { + float3 direction; + float3 color; + float attenuation; + }; + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + float R0 = max(0, L0); + float3 R1 = 0.5f * L1; + float lenR1 = length(R1); + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + float p = 1.0f + 2.0f * lenR1 / R0; + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + float poiMax(float2 i) + { + return max(i.x, i.y); + } + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + float blendDarken(float base, float blend) + { + return min(blend, base); + } + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + float blendLighten(float base, float blend) + { + return max(blend, base); + } + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + float blendLinearBurn(float base, float blend) + { + return max(base + blend - 1.0, 0.0); + } + float3 blendLinearBurn(float3 base, float3 blend) + { + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + float blendLinearDodge(float base, float blend) + { + return min(base + blend, 1.0); + } + float3 blendLinearDodge(float3 base, float3 blend) + { + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + float hue = hsv.x + Offset; + hsv.x = frac(hue); + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + static const float Epsilon = 1e-10; + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + float3 RGBtoHCV(in float3 RGB) + { + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + float3 HCYtoRGB(in float3 HCY) + { + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + float3 RGBtoHCY(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + return rgb; + } + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + return uv; + } + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + return 0.5 * log2(delta_max_sqr); + } + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + return float4(result1 + result2); + } + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + float4 inVecQ = quaternion_from_vector(inVec); + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + return rotated; + } + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + return srcColor; + } + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + o.pos.z += _Offset_Z * - 0.01; + #else + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + if (float(0)) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + #if defined(GRAIN) + float4 worldDirection; + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = float4(1,1,1,1); + poiMods.globalColorTheme[1] = float4(1,1,1,1); + poiMods.globalColorTheme[2] = float4(1,1,1,1); + poiMods.globalColorTheme[3] = float4(1,1,1,1); + } + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[float(0)] - float4(0.5,0.5,0,0); + float radius = length(delta) * 2 * float(1); + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * float(1); + return float2(radius, angle + distance(poiMesh.uv[float(0)], float4(0.5,0.5,0,0)) * float(0)); + } + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, float(1)) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), float(0)); + } + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + float(1)); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[float(0)] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + if (float(0) == 0) poiMesh.uv[0] = offset; + if (float(0) == 1) poiMesh.uv[1] = offset; + if (float(0) == 2) poiMesh.uv[2] = offset; + if (float(0) == 3) poiMesh.uv[3] = offset; + if (float(0) == 4) poiMesh.uv[4] = offset; + if (float(0) == 5) poiMesh.uv[5] = offset; + if (float(0) == 6) poiMesh.uv[6] = offset; + if (float(0) == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + float(0)); + if (float(0)) + { + float3 position = float(1) ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(float(0), float(1), smoothstep(float(0), float(0), distance(position, poiCam.worldPos))); + } + if (float(1)) + { + float holoRim = saturate(1 - smoothstep(min(float(0.5), float(0.5)), float(0.5), poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, float(0))); + poiFragData.alpha *= float(0) ?1 - holoRim : holoRim; + } + if (float(0)) + { + half cameraAngleMin = float(45) / 180; + half cameraAngleMax = float(90) / 180; + half modelAngleMin = float(45) / 180; + half modelAngleMax = float(90) / 180; + float3 pos = float(0) == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(float4(0,0,1,1)))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (float(0) == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, float(0)); + } + else if (float(0) == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, float(0)); + } + else if (float(0) == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, float(0)); + } + } + } + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (float(0)) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * float(0.1)); + } + } + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + + if (float(0) == 1) + { + + if (float(0)) + { + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * float4(0.25,0.25,4,4).zw)) * float(0.25); + poiFragData.alpha = (poiFragData.alpha - float(0.5)) / max(fwidth(poiFragData.alpha), 0.0001) + float(0.5); + } + } + } + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), float(1)); + poiFragData.baseColor *= lerp(1, vertCol, float(0)); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, float(0)); + } + #ifdef VIGNETTE_MASKED + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #define CLOTHMODE HARD + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + float a2 = roughness * roughness; + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + return v; + } + float D_GGX(float roughness, float NoH) + { + float oneMinusNoHSquared = 1.0 - NoH * NoH; + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + float D_Charlie(float roughness, float NoH) + { + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + float V_Neubelt(float NoV, float NoL) + { + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + float F_Schlick(float3 f0, float f90, float VoH) + { + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + float F_Schlick(float3 f0, float VoH) { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + float Fd_Wrap(float NoL, float w) { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + return (D * V) * F; + } + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + float3 reflDir = reflect(-poiCam.viewDir, normal); + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + #if UNITY_SPECCUBE_BLENDING + + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), float(0)); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + x2 += L2_0; + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + float3 GetSHDirectionL1() + { + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = float(0.5) - float(0.0001); + float firstColorFeatherStep = float(0) - float(0.0001); + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), float(0)); + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, float(0)); + firstShadeMap.rgb *= float4(1,1,1,1).rgb; //* lighColor + secondShadeMap.rgb *= float4(1,1,1,1).rgb; //* LightColor; + float shadowMask = 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (float(0.5) - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (float(0) - firstColorFeatherStep) * (shadowMask)); + mainShadowMask *= poiLight.shadowMask; + firstSecondShadowMask *= poiLight.shadowMask; + if (float(0) == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1-mainShadowMask; + } + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - float(0); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + return indirectLight; + } + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + float shadowStrength = float(1) * poiLight.shadowMask; + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - float(0)) / saturate(float(0.5) - float(0) + fwidth(poiLight.lightMap))); + poiLight.finalLighting = lerp((float4(1,1,1,1) * lerp(poiLight.indirectColor, poiLight.directColor, float(0)) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, float(0), poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + #ifdef _LIGHTINGMODE_CLOTH + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * float(0.5)); + float reflectance = float(0.5) * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r *float(0), 2) * ClothMetallic(clothmask); + roughness = float(0) == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (float(0.5)); + float metallic = pow(float(0), 2); + float reflectance = float(0.5); + float clothmask = 1; + #endif + float perceptualRoughness = pow(roughness,2); + float clampedRoughness = max(0.002, perceptualRoughness); + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + float3 dfg = SampleDFG(poiLight.nDotV ,perceptualRoughness); + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3,0.59,0.11) + float wrap = float(0); + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, float(0))); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - float(0)) / saturate(float(0.5) - float(0) + fwidth(poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float4(1,1,1,1) * lerp(poiLight.indirectColor, 1, float(0)), float3(1, 1, 1), saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - float(1)); + #endif + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + float subsurface = 1; + float skinScattering = saturate(subsurface * float(1) * 2); + half3 absorption = exp((1.0h - subsurface) * float4(-8,-40,-64,0).rgb); + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, float(0.7))); + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * float4(1,1,1,1), float4(1,1,1,1), float(0)) + (sss * poiLight.directColor), poiLight.directColor); + #endif + #endif + #ifdef UNITY_PASS_FORWARDADD + if (float(1) == 0) // Realistic + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (float(1) == 1) // Toon + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = float(0.5); + #endif + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + #endif + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + if (float(1) == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + } + if (float(1) == 1) // Toon + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * float(0.5) * poiLight.vAttenuation[index], smoothstep(float(0), float(0.5), poiLight.vDotNL[index])) * poiLight.detailShadow; + } + if (float(1) == 2) //if(float(1) == 2) // Wrapped + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * float(0.5) * poiLight.vAttenuation[index], smoothstep(float(0), float(0.5), poiLight.vDotNL[index])) * poiLight.detailShadow; + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + float3 normal0 = poiMesh.normals[float(1)]; + #ifdef POI_MATCAP0 + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[float(1)], poiMesh, _Matcap0NormalMap, float4(3,3,0,0), float4(0,0,0,0), float(0), float(1)); + #endif + #endif + switch(float(1)) + { + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + matcapUV = noSknewViewNormal.rg * float(0.43) + 0.5; + break; + } + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * float(0.43) + 0.5; + break; + } + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * float(0.43) + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #else + matcap = float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #endif + matcap.rgb *= float(1); + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + matcapMask = 1; + #endif + if (float(0)) + { + matcapMask = 1 - matcapMask; + } + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * float(0)); + if (float(0)) + { + matcap.rgb = hueShift(matcap.rgb, float(0) + _Time.x * float(0)); + } + blendMatcap(poiLight, poiFragData, float(0), float(0), float(0), matcap, matcapMask, float(0), float(0) + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + #ifdef COLOR_GRADING_HDR_3D + float3 normal1 = poiMesh.normals[float(1)]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[float(1)], poiMesh, _Matcap1NormalMap, float4(3,3,0,0), float4(0,0,0,0), float(0), float(1)); + #endif + #endif + matcapUV = 0; + switch(float(1)) + { + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + matcapUV = noSknewViewNormal.rg * float(0.43) + 0.5; + break; + } + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * float(0.43) + 0.5; + break; + } + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * float(0.43) + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #else + matcap2 = float4(poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)), float4(1,1,1,1).a); + #endif + matcap2.rgb *= float(1); + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + #else + matcap2Mask = 1; + #endif + if (float(0)) + { + matcap2Mask = 1 - matcap2Mask; + } + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * float(0)); + if (float(0)) + { + matcap2.rgb = hueShift(matcap2.rgb, float(0) + _Time.x * float(0)); + } + blendMatcap(poiLight, poiFragData, float(1), float(0), float(0), matcap2, matcap2Mask, float(0), float(0) + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[float(0)].xy, float4(10,10,0,0)) + _Time.x * float4(0,0,0,0)); + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)), float(1)); + poiMesh.tangentSpaceNormal = mainNormal; + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + calculateGlobalThemes(poiMods); + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.occlusion = lerp(1, AOMaps.r, float(1)) * lerp(1, AOMaps.g, float(0)) * lerp(1, AOMaps.b, float(0)) * lerp(1, AOMaps.a, float(0)); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.detailShadow = lerp(1, DetailShadows.r, float(1)) * lerp(1, DetailShadows.g, float(0)) * lerp(1, DetailShadows.b, float(0)) * lerp(1, DetailShadows.a, float(0)); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)); + poiLight.shadowMask = lerp(1, ShadowMasks.r, float(1)) * lerp(1, ShadowMasks.g, float(0)) * lerp(1, ShadowMasks.b, float(0)) * lerp(1, ShadowMasks.a, float(0)); + #else + poiLight.shadowMask = 1; + #endif + #ifdef UNITY_PASS_FORWARDBASE + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + poiLight.vColor[index] = unity_LightColor[index].rgb; + if (float(0) == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / float(1))); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + if (float(1) == 0) // Poi Custom Light Color + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], float(0)), 1)); + } + if (float(1) == 1) // More standard approach to light color + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + if (float(1) == 2) // UTS style + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * float(1), max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * float(1))); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + float lightMapMode = float(0); + if (float(0) == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (float(0) == 1 || float(0) == 2) + { + if (float(0) == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz;; + } + if (float(0) == 2) + { + poiLight.direction = float4(0,0,0,1); + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + if (float(0) == 3) // UTS + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = float(0); + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + if (lightMapMode == 0) // Poi special light map + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + if (lightMapMode == 1) // Normalized nDotL + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + if (lightMapMode == 2) // Saturated nDotL + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / float(0)))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / float(0)))); + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), float(0)); + if (float(1)) + { + poiLight.directColor = min(poiLight.directColor, float(1)); + poiLight.indirectColor = min(poiLight.indirectColor, float(1)); + } + if (float(0)) + { + poiLight.directColor = poiThemeColor(poiMods, float4(1,1,1,1), float(0)); + } + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * float(1), 0); + poiLight.directColor = max(poiLight.directColor + float(0), 0); + poiLight.indirectColor = max(poiLight.indirectColor * float(1), 0); + poiLight.indirectColor = max(poiLight.indirectColor + float(0), 0); + #endif + #endif + #ifdef UNITY_PASS_FORWARDADD + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = float(0) ? min(float(1), _LightColor0.rgb) : _LightColor0.rgb; + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, float(0.5)); + #endif + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), float(0)); + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)); + poiFragData.alpha = mainTexture.a * float4(1,1,1,1).a; + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)).r; + if (float(0)) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + poiFragData.alpha *= alphaMask; + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + applyVertexColor(poiFragData, poiMesh); + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + if (float(0)) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + if (float(0) == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + if (float(0) == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + if (float(0) == 1) + { + clip(poiFragData.alpha - float(0.5)); + } + if (float(0) == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + } + ENDCG + } + Pass + { + Tags { "LightMode" = "ShadowCaster" } + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask Off + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + CGPROGRAM +#define OPTIMIZER_ENABLED +#define COLOR_GRADING_HDR_3D +#define POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE +#define POI_LIGHT_DATA_ADDITIVE_ENABLE +#define POI_MATCAP0 +#define POI_MATCAP0_CUSTOM_NORMAL +#define POI_MATCAP1_CUSTOM_NORMAL +#define POI_PARALLAX +#define POI_VERTEXLIGHT_ON +#define VIGNETTE_MASKED +#define _LIGHTINGMODE_WRAPPED +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 0 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINCATEGORY 0 +#define PROP_COLORTHEMEINDEX 0 +#define PROP_MAINTEX +#define PROP_MAINTEXUV 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROP_CUTOFF 0.5 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTOGGLE 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROP_MAINHUESHIFTREPLACE 1 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_MAINHUEALCTENABLED 0 +#define PROP_MAINALHUESHIFTBAND 0 +#define PROP_MAINALHUESHIFTCTINDEX 0 +#define PROP_MAINHUEALMOTIONSPEED 1 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_ALPHA 1 +#define PROP_ALPHAFORCEOPAQUE 0 +#define PROP_ALPHAMOD 0 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHATOCOVERAGE 0 +#define PROP_ALPHASHARPENEDA2C 0 +#define PROP_ALPHAMIPSCALE 0.25 +#define PROP_ALPHADITHERING 0 +#define PROP_ALPHADITHERGRADIENT 0.1 +#define PROP_ALPHADISTANCEFADE 0 +#define PROP_ALPHADISTANCEFADETYPE 1 +#define PROP_ALPHADISTANCEFADEMINALPHA 0 +#define PROP_ALPHADISTANCEFADEMAXALPHA 1 +#define PROP_ALPHADISTANCEFADEMIN 0 +#define PROP_ALPHADISTANCEFADEMAX 0 +#define PROP_ALPHAFRESNEL 1 +#define PROP_ALPHAFRESNELALPHA 0 +#define PROP_ALPHAFRESNELSHARPNESS 0.5 +#define PROP_ALPHAFRESNELWIDTH 0.5 +#define PROP_ALPHAFRESNELINVERT 0 +#define PROP_ALPHAANGULAR 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROP_ALPHAAUDIOLINKENABLED 0 +#define PROP_ALPHAAUDIOLINKADDBAND 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTINTTHEMEINDEX 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTMASKUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROP_VERTEXAUDIOLINKENABLED 0 +#define PROP_VERTEXLOCALTRANSLATIONALBAND 0 +#define PROP_VERTEXLOCALROTATIONALBANDX 0 +#define PROP_VERTEXLOCALROTATIONALBANDY 0 +#define PROP_VERTEXLOCALROTATIONALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDX 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEX 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDY 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEY 0 +#define PROP_VERTEXLOCALROTATIONCTALBANDZ 0 +#define PROP_VERTEXLOCALROTATIONCTALTYPEZ 0 +#define PROP_VERTEXLOCALSCALEALBAND 0 +#define PROP_VERTEXWORLDTRANSLATIONALBAND 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBAND 0 +#define PROP_VERTEXROUNDINGRANGEBAND 0 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORINGLINEARSPACE 1 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACECOLORTHEMEINDEX 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROP_BACKFACEALPHA 1 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEMASKUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEREPLACEALPHA 0 +#define PROP_BACKFACEHUESHIFTENABLED 0 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEHUESHIFTSPEED 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_REDCOLORTHEMEINDEX 0 +#define PROP_REDTEXUREUV 0 +#define PROP_GREENCOLORTHEMEINDEX 0 +#define PROP_GREENTEXTUREUV 0 +#define PROP_BLUECOLORTHEMEINDEX 0 +#define PROP_BLUETEXTUREUV 0 +#define PROP_ALPHACOLORTHEMEINDEX 0 +#define PROP_ALPHATEXTUREUV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROP_RGBNORMALAUV 0 +#define PROP_RGBNORMALASCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECAL0MASKCHANNEL 0 +#define PROP_DECALCOLORTHEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALOVERIDEALPHA 0 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROP_DECAL0HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECAL1MASKCHANNEL 1 +#define PROP_DECALCOLOR1THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALOVERIDEALPHA1 0 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROP_DECAL1HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECAL2MASKCHANNEL 2 +#define PROP_DECALCOLOR2THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALOVERIDEALPHA2 0 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROP_DECAL2HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECAL3MASKCHANNEL 3 +#define PROP_DECALCOLOR3THEMEINDEX 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALOVERIDEALPHA3 0 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROP_DECAL3HUEANGLESTRENGTH 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3SIDEBAND 0 +#define PROP_AUDIOLINKDECAL3ROTATIONBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROP_AUDIOLINKDECALX 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_GLOBALTHEMES 0 +#define PROPM_END_GLOBALTHEMES 0 +#define PROPM_LIGHTINGCATEGORY 1 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_LIGHTINGAOMAPSUV 0 +#define PROP_LIGHTDATAAOSTRENGTHR 1 +#define PROP_LIGHTDATAAOSTRENGTHG 0 +#define PROP_LIGHTDATAAOSTRENGTHB 0 +#define PROP_LIGHTDATAAOSTRENGTHA 0 +#define PROP_LIGHTINGDETAILSHADOWMAPSUV 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHR 1 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHG 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHB 0 +#define PROP_LIGHTINGDETAILSHADOWSTRENGTHA 0 +#define PROP_LIGHTINGSHADOWMASKSUV 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHR 1 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHG 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHB 0 +#define PROP_LIGHTINGSHADOWMASKSTRENGTHA 0 +#define PROP_LIGHTINGCOLORMODE 1 +#define PROP_LIGHTINGMAPMODE 0 +#define PROP_LIGHTINGDIRECTIONMODE 0 +#define PROP_LIGHTINGFORCECOLORENABLED 0 +#define PROP_LIGHTINGFORCEDCOLORTHEMEINDEX 0 +#define PROP_UNLIT_INTENSITY 1 +#define PROP_LIGHTINGCAPENABLED 1 +#define PROP_LIGHTINGCAP 1 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINLIGHTINDIBRIGHTNESS 0 +#define PROP_LIGHTINGINDIRECTUSESNORMALS 0 +#define PROP_LIGHTINGCASTEDSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEENABLE 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_LIGHTINGADDITIVELIMITED 0 +#define PROP_LIGHTINGADDITIVELIMIT 1 +#define PROP_LIGHTINGADDITIVEMONOCHROMATIC 0 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGVERTEXLIGHTINGENABLED 1 +#define PROP_LIGHTDATADEBUGENABLED 0 +#define PROP_LIGHTINGDEBUGVISUALIZE 0 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POISHADING 0 +#define PROP_SHADINGENABLED 1 +#define PROP_LIGHTINGMODE 2 +#define PROP_TOONRAMP +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_LIGHTINGGRADIENTSTARTWRAP 0 +#define PROP_LIGHTINGGRADIENTENDWRAP 0.5 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_SHADINGSHADEMAPBLENDTYPE 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_SKINLUT +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_CLOTHDFG +#define PROP_CLOTHMETALLICSMOOTHNESSMAPINVERT 0 +#define PROP_CLOTHMETALLICSMOOTHNESSMAPUV 0 +#define PROP_CLOTHLERP 0 +#define PROP_CLOTHMETALLIC 0 +#define PROP_CLOTHREFLECTANCE 0.5 +#define PROP_CLOTHSMOOTHNESS 0.5 +#define PROP_SHADOWSTRENGTH 1 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROPM_END_POISHADING 0 +#define PROPM_START_MATCAP 1 +#define PROP_MATCAPENABLE 1 +#define PROP_MATCAPUVMODE 1 +#define PROP_MATCAPCOLORTHEMEINDEX 0 +#define PROP_MATCAP +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 0 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPALPHAOVERRIDE 0 +#define PROP_MATCAPNORMAL 1 +#define PROP_MATCAP0CUSTOMNORMAL 1 +#define PROP_MATCAP0NORMALMAP +#define PROP_MATCAP0NORMALMAPUV 0 +#define PROP_MATCAP0NORMALMAPSCALE 1 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 1 +#define PROP_MATCAP2ENABLE 1 +#define PROP_MATCAP2UVMODE 1 +#define PROP_MATCAP2COLORTHEMEINDEX 0 +#define PROP_MATCAP2 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 1 +#define PROP_MATCAP2ALPHAOVERRIDE 0 +#define PROP_MATCAP2NORMAL 1 +#define PROP_MATCAP1CUSTOMNORMAL 1 +#define PROP_MATCAP1NORMALMAP +#define PROP_MATCAP1NORMALMAPUV 0 +#define PROP_MATCAP1NORMALMAPSCALE 1 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_CUBEMAP 0 +#define PROP_CUBEMAPENABLED 0 +#define PROP_CUBEMAPUVMODE 1 +#define PROP_CUBEMAPCOLORTHEMEINDEX 0 +#define PROP_CUBEMAPMASKUV 0 +#define PROP_CUBEMAPMASKINVERT 0 +#define PROP_CUBEMAPEMISSIONSTRENGTH 0 +#define PROP_CUBEMAPINTENSITY 1 +#define PROP_CUBEMAPLIGHTMASK 0 +#define PROP_CUBEMAPREPLACE 1 +#define PROP_CUBEMAPMULTIPLY 0 +#define PROP_CUBEMAPADD 0 +#define PROP_CUBEMAPNORMAL 1 +#define PROP_CUBEMAPHUESHIFTENABLED 0 +#define PROP_CUBEMAPHUESHIFTSPEED 0 +#define PROP_CUBEMAPHUESHIFT 0 +#define PROPM_END_CUBEMAP 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMLIGHTCOLORTHEMEINDEX 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.25 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_BRDF 0 +#define PROP_MOCHIEBRDF 0 +#define PROP_MOCHIEREFLECTIONSTRENGTH 1 +#define PROP_MOCHIESPECULARSTRENGTH 1 +#define PROP_MOCHIEMETALLICMULTIPLIER 0 +#define PROP_MOCHIEROUGHNESSMULTIPLIER 1 +#define PROP_MOCHIEREFLECTIONTINTTHEMEINDEX 0 +#define PROP_MOCHIESPECULARTINTTHEMEINDEX 0 +#define PROP_MOCHIEMETALLICMAPINVERT 0 +#define PROP_MOCHIEMETALLICMAPUV 0 +#define PROP_MOCHIEROUGHNESSMAPINVERT 0 +#define PROP_MOCHIEROUGHNESSMAPUV 0 +#define PROP_MOCHIEREFLECTIONMASKINVERT 0 +#define PROP_MOCHIEREFLECTIONMASKUV 0 +#define PROP_MOCHIESPECULARMASKINVERT 0 +#define PROP_MOCHIESPECULARMASKUV 0 +#define PROP_MOCHIEFORCEFALLBACK 0 +#define PROP_MOCHIELITFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATSMOOTHNESSMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOATMASKUV 0 +#define PROP_CLEARCOATNORMAL 0 +#define PROP_CLEARCOATTINTTHEMEINDEX 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATSMOOTHNESS 0 +#define PROP_CLEARCOATSAMPLEWORLD 1 +#define PROP_CLEARCOATFORCELIGHTING 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_STYLIZEDSPEC 0 +#define PROP_STYLIZEDSPECULAR 0 +#define PROP_HIGHCOLOR_TEXUV 0 +#define PROP_HIGHCOLORTHEMEINDEX 0 +#define PROP_SET_HIGHCOLORMASKUV 0 +#define PROP_TWEAK_HIGHCOLORMASKLEVEL 0 +#define PROP_IS_SPECULARTOHIGHCOLOR 0 +#define PROP_IS_BLENDADDTOHICOLOR 0 +#define PROP_STYLIZEDSPECULARSTRENGTH 1 +#define PROP_USELIGHTCOLOR 1 +#define PROP_HIGHCOLOR_POWER 0.2 +#define PROP_STYLIZEDSPECULARFEATHER 0 +#define PROP_LAYER1STRENGTH 1 +#define PROP_LAYER2SIZE 0 +#define PROP_STYLIZEDSPECULAR2FEATHER 0 +#define PROP_LAYER2STRENGTH 0 +#define PROPM_END_STYLIZEDSPEC 0 +#define PROPM_SPECIALFXCATEGORY 1 +#define PROPM_START_UDIMDISCARDOPTIONS 0 +#define PROP_ENABLEUDIMDISCARDOPTIONS 0 +#define PROP_UDIMDISCARDUV 0 +#define PROP_UDIMDISCARDMODE 1 +#define PROPM_END_UDIMDISCARDOPTIONS 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGECOLORTHEMEINDEX 0 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETEXTURECOLORTHEMEINDEX 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKCOLORTHEMEINDEX 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_FLIPBOOKCHRONOTENSITYENABLED 0 +#define PROP_FLIPBOOKCHRONOTENSITYBAND 0 +#define PROP_FLIPBOOKCHRONOTENSITYSPEED 1 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_EMISSIONS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE0 0 +#define PROP_EMISSIONCOLORTHEMEINDEX 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMASK +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 1 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROP_EMISSIONAL0ENABLED 0 +#define PROP_EMISSIONAL0STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION0CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION0CENTEROUTBAND 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONREPLACE1 1 +#define PROP_EMISSIONCOLOR1THEMEINDEX 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMASK1 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 1 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROP_EMISSIONAL1ENABLED 0 +#define PROP_EMISSIONAL1STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION1CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_EMISSION2OPTIONS 0 +#define PROP_ENABLEEMISSION2 0 +#define PROP_EMISSIONREPLACE2 1 +#define PROP_EMISSIONCOLOR2THEMEINDEX 0 +#define PROP_EMISSIONMAP2UV 0 +#define PROP_EMISSIONBASECOLORASMAP2 0 +#define PROP_EMISSIONMASK2 +#define PROP_EMISSIONMASK2UV 0 +#define PROP_EMISSIONSTRENGTH2 1 +#define PROP_EMISSIONHUESHIFTENABLED2 0 +#define PROP_EMISSIONHUESHIFT2 0 +#define PROP_EMISSIONHUESHIFTSPEED2 0 +#define PROP_EMISSIONCENTEROUTENABLED2 0 +#define PROP_EMISSIONCENTEROUTSPEED2 5 +#define PROP_ENABLEGITDEMISSION2 0 +#define PROP_GITDEWORLDORMESH2 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER2 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER2 0 +#define PROP_GITDEMINLIGHT2 0 +#define PROP_GITDEMAXLIGHT2 1 +#define PROP_EMISSIONBLINKINGENABLED2 0 +#define PROP_EMISSIVEBLINK_MIN2 0 +#define PROP_EMISSIVEBLINK_MAX2 1 +#define PROP_EMISSIVEBLINK_VELOCITY2 4 +#define PROP_EMISSIONBLINKINGOFFSET2 0 +#define PROP_SCROLLINGEMISSION2 0 +#define PROP_EMISSIONSCROLLINGUSECURVE2 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR2 0 +#define PROP_EMISSIVESCROLL_WIDTH2 10 +#define PROP_EMISSIVESCROLL_VELOCITY2 10 +#define PROP_EMISSIVESCROLL_INTERVAL2 20 +#define PROP_EMISSIONAL2ENABLED 0 +#define PROP_EMISSIONAL2STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION2CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION2CENTEROUTBAND 0 +#define PROPM_END_EMISSION2OPTIONS 0 +#define PROPM_START_EMISSION3OPTIONS 0 +#define PROP_ENABLEEMISSION3 0 +#define PROP_EMISSIONREPLACE3 1 +#define PROP_EMISSIONCOLOR3THEMEINDEX 0 +#define PROP_EMISSIONMAP3UV 0 +#define PROP_EMISSIONBASECOLORASMAP3 0 +#define PROP_EMISSIONMASK3 +#define PROP_EMISSIONMASK3UV 0 +#define PROP_EMISSIONSTRENGTH3 1 +#define PROP_EMISSIONHUESHIFTENABLED3 0 +#define PROP_EMISSIONHUESHIFT3 0 +#define PROP_EMISSIONHUESHIFTSPEED3 0 +#define PROP_EMISSIONCENTEROUTENABLED3 0 +#define PROP_EMISSIONCENTEROUTSPEED3 5 +#define PROP_ENABLEGITDEMISSION3 0 +#define PROP_GITDEWORLDORMESH3 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER3 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER3 0 +#define PROP_GITDEMINLIGHT3 0 +#define PROP_GITDEMAXLIGHT3 1 +#define PROP_EMISSIONBLINKINGENABLED3 0 +#define PROP_EMISSIVEBLINK_MIN3 0 +#define PROP_EMISSIVEBLINK_MAX3 1 +#define PROP_EMISSIVEBLINK_VELOCITY3 4 +#define PROP_EMISSIONBLINKINGOFFSET3 0 +#define PROP_SCROLLINGEMISSION3 0 +#define PROP_EMISSIONSCROLLINGUSECURVE3 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR3 0 +#define PROP_EMISSIVESCROLL_WIDTH3 10 +#define PROP_EMISSIVESCROLL_VELOCITY3 10 +#define PROP_EMISSIVESCROLL_INTERVAL3 20 +#define PROP_EMISSIONAL3ENABLED 0 +#define PROP_EMISSIONAL3STRENGTHBAND 0 +#define PROP_AUDIOLINKEMISSION3CENTEROUTWIDTH 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTSIZE 1 +#define PROP_AUDIOLINKEMISSION3CENTEROUTBAND 0 +#define PROPM_END_EMISSION3OPTIONS 0 +#define PROPM_END_EMISSIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERUV 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERCOLORTHEMEINDEX 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_PATHING 0 +#define PROP_ENABLEPATHING 0 +#define PROP_PATHINGMAPUV 0 +#define PROP_PATHINGCOLORMAPUV 0 +#define PROP_PATHTYPER 0 +#define PROP_PATHTYPEG 0 +#define PROP_PATHTYPEB 0 +#define PROP_PATHCOLORRTHEMEINDEX 0 +#define PROP_PATHCOLORGTHEMEINDEX 0 +#define PROP_PATHCOLORBTHEMEINDEX 0 +#define PROPM_START_PATHAUDIOLINK 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDR 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDG 0 +#define PROP_AUDIOLINKPATHTIMEOFFSETBANDB 0 +#define PROPM_END_PATHAUDIOLINK 0 +#define PROPM_END_PATHING 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DEPTHFX 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHCOLORTOGGLE 0 +#define PROP_DEPTHCOLORBLENDMODE 0 +#define PROP_DEPTHTEXTUREUV 0 +#define PROP_DEPTHCOLORTHEMEINDEX 0 +#define PROP_DEPTHEMISSIONSTRENGTH 0 +#define PROP_DEPTHCOLORMINDEPTH 0 +#define PROP_DEPTHCOLORMAXDEPTH 1 +#define PROP_DEPTHCOLORMINVALUE 0 +#define PROP_DEPTHCOLORMAXVALUE 1 +#define PROP_DEPTHALPHATOGGLE 0 +#define PROP_DEPTHALPHAMINDEPTH 0 +#define PROP_DEPTHALPHAMAXDEPTH 1 +#define PROP_DEPTHALPHAMINVALUE 0 +#define PROP_DEPTHALPHAMAXVALUE 1 +#define PROPM_END_DEPTHFX 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALMAPUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROP_IRIDESCENCEHUESHIFTENABLED 0 +#define PROP_IRIDESCENCEHUESHIFTSPEED 0 +#define PROP_IRIDESCENCEHUESHIFT 0 +#define PROPM_START_IRIDESCENCEAUDIOLINK 0 +#define PROP_IRIDESCENCEAUDIOLINKEMISSIONBAND 0 +#define PROPM_END_IRIDESCENCEAUDIOLINK 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTGLYPHS +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 1 +#define PROP_TEXTFPSENABLED 1 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSCOLORTHEMEINDEX 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 1 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONCOLORTHEMEINDEX 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 1 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMECOLORTHEMEINDEX 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_AUDIOLINKCATEGORY 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKANIMTOGGLE 1 +#define PROP_DEBUGWAVEFORM 0 +#define PROP_DEBUGDFT 0 +#define PROP_DEBUGBASS 0 +#define PROP_DEBUGLOWMIDS 0 +#define PROP_DEBUGHIGHMIDS 0 +#define PROP_DEBUGTREBLE 0 +#define PROP_DEBUGCCCOLORS 0 +#define PROP_DEBUGCCSTRIP 0 +#define PROP_DEBUGCCLIGHTS 0 +#define PROP_DEBUGAUTOCORRELATOR 0 +#define PROP_DEBUGCHRONOTENSITY 0 +#define PROP_DEBUGVISUALIZERHELPBOX 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_START_ALDECALSPECTRUM 0 +#define PROP_ENABLEALDECAL 0 +#define PROP_ALDECALTYPE 0 +#define PROP_ALDECALUVMODE 0 +#define PROP_ALDECALUV 0 +#define PROP_ALUVROTATION 0 +#define PROP_ALUVROTATIONSPEED 0 +#define PROP_ALDECALLINEWIDTH 1 +#define PROP_ALDECALVOLUMESTEP 0 +#define PROP_ALDECALVOLUMECLIPMIN 0 +#define PROP_ALDECALVOLUMECLIPMAX 1 +#define PROP_ALDECALBANDSTEP 0 +#define PROP_ALDECALBANDCLIPMIN 0 +#define PROP_ALDECALBANDCLIPMAX 1 +#define PROP_ALDECALSHAPECLIP 0 +#define PROP_ALDECALSHAPECLIPVOLUMEWIDTH 0.5 +#define PROP_ALDECALSHAPECLIPBANDWIDTH 0.5 +#define PROP_ALDECALVOLUME 0.5 +#define PROP_ALDECALBASEBOOST 5 +#define PROP_ALDECALTREBLEBOOST 1 +#define PROP_ALDECALVOLUMECOLORSOURCE 1 +#define PROP_ALDECALLOWEMISSION 0 +#define PROP_ALDECALMIDEMISSION 0 +#define PROP_ALDECALHIGHEMISSION 0 +#define PROP_ALDECALBLENDTYPE 0 +#define PROP_ALDECALBLENDALPHA 1 +#define PROP_ALDECALCONTROLSALPHA 0 +#define PROPM_END_ALDECALSPECTRUM 0 +#define PROPM_MODIFIERCATEGORY 0 +#define PROPM_START_UVDISTORTION 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONUVTODISTORT 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONFLOWTEXTUREUV 0 +#define PROP_DISTORTIONFLOWTEXTURE1UV 0 +#define PROP_DISTORTIONSTRENGTH 0.03 +#define PROP_DISTORTIONSTRENGTH1 0.01 +#define PROPM_END_UVDISTORTION 0 +#define PROPM_START_UVPANOSPHERE 0 +#define PROP_STEREOENABLED 0 +#define PROP_PANOUSEBOTHEYES 1 +#define PROPM_END_UVPANOSPHERE 0 +#define PROPM_START_UVPOLAR 0 +#define PROP_POLARUV 0 +#define PROP_POLARRADIALSCALE 1 +#define PROP_POLARLENGTHSCALE 1 +#define PROP_POLARSPIRALPOWER 0 +#define PROPM_END_UVPOLAR 0 +#define PROPM_START_PARALLAX 1 +#define PROP_POIPARALLAX 1 +#define PROP_PARALLAXUV 0 +#define PROP_HEIGHTMAPUV 0 +#define PROP_HEIGHTSTRENGTH 0.1 +#define PROP_CURVATUREU 0 +#define PROP_CURVATUREV 0 +#define PROP_HEIGHTSTEPSMIN 10 +#define PROP_HEIGHTSTEPSMAX 128 +#define PROP_CURVFIX 1 +#define PROPM_END_PARALLAX 0 +#define PROPM_THIRDPARTYCATEGORY 0 +#define PROPM_POSTPROCESSING 0 +#define PROPM_START_POILIGHTDATA 0 +#define PROP_PPHELP 0 +#define PROP_PPLIGHTINGMULTIPLIER 1 +#define PROP_PPLIGHTINGADDITION 0 +#define PROP_PPEMISSIONMULTIPLIER 1 +#define PROP_PPFINALCOLORMULTIPLIER 1 +#define PROPM_END_POILIGHTDATA 0 +#define PROPM_START_POSTPROCESS 0 +#define PROP_POSTPROCESS 0 +#define PROP_PPMASKINVERT 0 +#define PROP_PPMASKUV 0 +#define PROP_PPLUTSTRENGTH 0 +#define PROP_PPHUE 0 +#define PROP_PPCONTRAST 1 +#define PROP_PPSATURATION 1 +#define PROP_PPBRIGHTNESS 1 +#define PROP_PPLIGHTNESS 0 +#define PROP_PPHDR 0 +#define PROPM_END_POSTPROCESS 0 +#define PROPM_RENDERINGCATEGORY 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_RENDERINGREDUCECLIPDISTANCE 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPENUM_FALLBACK 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 + + #pragma target 5.0 + #pragma multi_compile_instancing + #pragma multi_compile_shadowcaster + #pragma multi_compile_fog + #define POI_PASS_SHADOW + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + uniform float4 _AudioTexture_TexelSize; + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + float _Mode; + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + #ifdef POI_PARALLAX + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + #endif + float _IgnoreFog; + float _RenderingReduceClipDistance; + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + float _AlphaDithering; + float _AlphaDitherGradient; + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + struct PoiMesh + { + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + float2 uv[8]; + float2 parallaxUV; + }; + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + }; + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + struct PoiLight + { + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + }; + struct PoiVertexLights + { + float3 direction; + float3 color; + float attenuation; + }; + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + float R0 = max(0, L0); + float3 R1 = 0.5f * L1; + float lenR1 = length(R1); + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + float p = 1.0f + 2.0f * lenR1 / R0; + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + float poiMax(float2 i) + { + return max(i.x, i.y); + } + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + float blendDarken(float base, float blend) + { + return min(blend, base); + } + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + float blendLighten(float base, float blend) + { + return max(blend, base); + } + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + float blendLinearBurn(float base, float blend) + { + return max(base + blend - 1.0, 0.0); + } + float3 blendLinearBurn(float3 base, float3 blend) + { + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + float blendLinearDodge(float base, float blend) + { + return min(base + blend, 1.0); + } + float3 blendLinearDodge(float3 base, float3 blend) + { + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + float hue = hsv.x + Offset; + hsv.x = frac(hue); + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + static const float Epsilon = 1e-10; + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + float3 RGBtoHCV(in float3 RGB) + { + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + float3 HCYtoRGB(in float3 HCY) + { + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + float3 RGBtoHCY(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + return rgb; + } + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + return uv; + } + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + return 0.5 * log2(delta_max_sqr); + } + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + return float4(result1 + result2); + } + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + float4 inVecQ = quaternion_from_vector(inVec); + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + return rotated; + } + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + return srcColor; + } + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + o.pos.z += _Offset_Z * - 0.01; + #else + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + if (float(0)) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + #if defined(GRAIN) + float4 worldDirection; + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[float(0)] - float4(0.5,0.5,0,0); + float radius = length(delta) * 2 * float(1); + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * float(1); + return float2(radius, angle + distance(poiMesh.uv[float(0)], float4(0.5,0.5,0,0)) * float(0)); + } + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, float(1)) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), float(0)); + } + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + float(1)); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[float(0)] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, float(10), float(128), float(0.1), 0, float4(1,1,0,0).xy, float2(float(0), float(0))); + if (float(0) == 0) poiMesh.uv[0] = offset; + if (float(0) == 1) poiMesh.uv[1] = offset; + if (float(0) == 2) poiMesh.uv[2] = offset; + if (float(0) == 3) poiMesh.uv[3] = offset; + if (float(0) == 4) poiMesh.uv[4] = offset; + if (float(0) == 5) poiMesh.uv[5] = offset; + if (float(0) == 6) poiMesh.uv[6] = offset; + if (float(0) == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + float(0)); + if (float(0)) + { + float3 position = float(1) ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(float(0), float(1), smoothstep(float(0), float(0), distance(position, poiCam.worldPos))); + } + if (float(1)) + { + float holoRim = saturate(1 - smoothstep(min(float(0.5), float(0.5)), float(0.5), poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, float(0))); + poiFragData.alpha *= float(0) ?1 - holoRim : holoRim; + } + if (float(0)) + { + half cameraAngleMin = float(45) / 180; + half cameraAngleMax = float(90) / 180; + half modelAngleMin = float(45) / 180; + half modelAngleMax = float(90) / 180; + float3 pos = float(0) == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(float4(0,0,1,1)))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (float(0) == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, float(0)); + } + else if (float(0) == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, float(0)); + } + else if (float(0) == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, float(0)); + } + } + } + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (float(0)) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * float(0.1)); + } + } + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + + if (float(0) == 1) + { + + if (float(0)) + { + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * float4(0.25,0.25,4,4).zw)) * float(0.25); + poiFragData.alpha = (poiFragData.alpha - float(0.5)) / max(fwidth(poiFragData.alpha), 0.0001) + float(0.5); + } + } + } + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), float(1)); + poiFragData.baseColor *= lerp(1, vertCol, float(0)); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, float(0)); + } + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[float(0)].xy, float4(10,10,0,0)) + _Time.x * float4(0,0,0,0)); + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)), float(1)); + poiMesh.tangentSpaceNormal = mainNormal; + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, float4(1,1,1,1).rgb, float(0)); + poiFragData.alpha = mainTexture.a * float4(1,1,1,1).a; + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[float(0)], float4(1,1,0,0)), float4(0,0,0,0)).r; + if (float(0)) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + poiFragData.alpha *= alphaMask; + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + applyVertexColor(poiFragData, poiMesh); + poiFragData.finalColor = poiFragData.baseColor; + if (float(0) == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + if (float(0) == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + if (float(0) == 1) + { + clip(poiFragData.alpha - float(0.5)); + } + if (float(0) == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + } + ENDCG + } + } + CustomEditor "Thry.ShaderEditor" +} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader.meta new file mode 100644 index 00000000..308247f8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/OptimizedShaders/M_PoiPro/Poiyomi Pro.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a33cdb3c19d12eb4085a3f3dc48a5452 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json new file mode 100644 index 00000000..a851b0df --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json @@ -0,0 +1 @@ +{"nmsc":"Poiyomi","variableSink":"DEFAULT_VARIABLES","codeSink":"DEFAULT_CODE","propKeyword":"SHADER_PROPERTIES","tmpExtension":"poiTemplate","tmpclExtension":"poiTemplateCollection","rscfName":"POIMSS","windowPath":"Poi/Tools/Modular Shader","createPath":"Poi/Modular Shader"} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json.meta new file mode 100644 index 00000000..6677b58b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/PoiMSSEmbedSettings.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 33aa5f5cfd160184b90004f7bccb7fe1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader new file mode 100644 index 00000000..c60a7e9f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader @@ -0,0 +1,25935 @@ +Shader ".poiyomi/V8.0/Pro Outline Early" +{ + Properties + { + [HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 + [HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 + [HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 + [HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 + [HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + + // Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + + // Main + [HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 + //Main-main + _Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 + _MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + _Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + + [HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness ("Brightness", Range(-1, 1)) = 0 + [ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 + _MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + _MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + [ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 + [ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 + _AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 + _AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 + [Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 + _AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 + _AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 + _AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + _AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 + _AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 + _AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + _AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + [ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) + _CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + + [Space(4)] + [ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 + _DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } + [HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + + [HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + + [Space(10)] + [ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + _VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + _VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + [ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + + // Back Face Textures and Emission + [HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 + [HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 + _BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _BackFaceAlpha ("Alpha", Range(0,1)) = 1 + _BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + [ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 + _BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 + _BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + + // RGBA Masking + [HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + [RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 + _RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 + _GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 + _GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 + _BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 + _BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 + _AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 + _AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + + // RGB MASKED NORMALS + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 + _RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + + // Decal Texture + [HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 + [RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 + // Decal 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 + _DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + _Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 0 Audio Link + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + // Decal 1 + //"GEOM_TYPE_FROND" + //"DEPTH_OF_FIELD_COC_VIEW" + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 + _DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + _Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 1 Audio Link + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + // Decal 2 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 + _DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + _Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 2 Audio Link + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + // Decal 3 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 + _DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + _Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 3 Audio Link + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 + _AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) + _AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) + [ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + + [HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 + _GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) + _GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) + _GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) + _GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) + [HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + + // Lighting + [HideInInspector] m_lightingCategory ("Shading", Float) = 0 + + [HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 + // Lighting Data + _LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 + [HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 + [HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 + [HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 + // Base Pass + [Space(15)] + [ThryHeaderLabel(Base Pass Lighting, 13)] + [Space(4)] + [Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 + [Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 + [Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 + [Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) + [ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 + _LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 + _Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 + [ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 + _LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 + _LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 + _LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 + _LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 + _LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 + _LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + // Lighting Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Lighting, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 + [ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 + _LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 + _LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + _LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 + // Vertex Lighting + [Space(15)] + [ThryHeaderLabel(Vertex Lighting, 13)] + [Space(4)] + [ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 + // Lighting Data Debug + [Space(15)] + [ThryHeaderLabel(Debug Visualization, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 + [ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + + [HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + + [HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 + [ThryHeaderLabel(Base Pass Shading, 13)] + [Space(4)] + [KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 + _LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } + _ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 + _LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 + _LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + + // Shade Maps + _1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + [Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 + //DJ Wrapped + _LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + // Realistic + _LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 + // Skin Shading + _SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } + _SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) + // Cloth + [NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } + [ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } + [HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 + [ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 + [Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0 + _ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35, 1)) = 0.5 + _ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0.5 + + // Generic + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=4)}", Range(0, 1)) = 1 + _LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + + // Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Shading, 13)] + [Space(4)] + [Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + //_LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 //TODO-implement this + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + + [HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + + // First Matcap + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 + [HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 + _MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + _MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + + // Second Matcap + [HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 + _Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + _Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + + // First CubeMap + [HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 + [HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 + [ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 + _CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } + _CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 + _CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 + _CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 + _CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 + _CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 + _CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 + _CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + + // Rim Lighting + [HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 + [HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 + _RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 + _RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + + [HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + + _MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 + _MochieSpecularStrength ("Specular", Range(0, 1)) = 1 + _MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 + _MochieRoughnessMultiplier ("Smoothness", Range(0, 1)) = 1 + + _MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 + _MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 + [Space(8)] + + [RGBAAtlas(Metallic Map, Smoothness Map, Reflection Mask, Specular Mask)]_MochieMetallicMaps ("Maps [Expand]--{reference_properties:[_MochieMetallicMapsPan, _MochieMetallicMapsUV, _MochieMetallicMapInvert, _MochieRoughnessMapInvert, _MochieReflectionMaskInvert, _MochieSpecularMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieMetallicMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapsUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert Metallic", Float) = 0 + [HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert Reflection Mask", Float) = 0 + [HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert Specular Mask", Float) = 0 + [Space(8)] + + [ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } + [ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 + [ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + + [HideInInspector] m_end_brdf ("", Float) = 0 + + [HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 + [HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + _ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + + _ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + + [NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + + [ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + + _ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 + _ClearCoat ("Clear Coat", Range(0, 1)) = 1 + _ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 + [ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 + [ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + + [HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 + [HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 + _RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("", Float) = 0 + + [HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 + [HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + + [ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 + _HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 + _Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } + [HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 + [HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 + [ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 + [ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + + _StylizedSpecularStrength ("Strength", Float) = 1 + [ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 1, 13)] + _HighColor_Power ("Size", Range(0, 1)) = 0.2 + _StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 + _Layer1Strength ("Strength", Range(0, 1)) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 2, 13)] + _Layer2Size ("Size", Range(0, 1)) = 0 + _StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 + _Layer2Strength ("Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_stylizedSpec ("", Float) = 0 + + // Outlines + [HideInInspector] m_OutlineCategory (" Outlines--{reference_property:_EnableOutlines}", Float) = 0 + // Outline Vertex + [HideInInspector][ToggleUI]_EnableOutlines ("Enable Outlines", float) = 0 + [Enum(Basic, 0, Tint, 1, Rim Light, 2, Directional, 3, DropShadow, 4)]_OutlineMode ("Mode", Int) = 0 + _OutlineTintMix ("Tint Mix--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==1}}", Range(0, 1)) = 0 + _OutlineRimLightBlend ("Rim Light Blend--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==2}}", Range(0, 1)) = 0 + _OutlinePersonaDirection ("directional Offset XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==3}}", Vector) = (1, 0, 0, 0) + _OutlineDropShadowOffset ("Drop Direction XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==4}}", Vector) = (1, 0, 0, 0) + [ToggleUI]_OutlineFixedSize ("Fixed Size?", Float) = 0 + _OutlinesMaxDistance ("Fixed Size Max Distance", Float) = 9999 + [Enum(Off, 0, Normals, 1, Mask VC.r, 2)]_OutlineUseVertexColors ("Vertex Color", Float) = 0 + [ToggleUI]_OutlineLit ("Enable Lighting", Float) = 1 + _LineWidth ("Width", Float) = 0 + _LineColor ("Color--{reference_property:_LineColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LineColorThemeIndex ("", Int) = 0 + _OutlineEmission ("Outline Emission", Float) = 0 + _OutlineTexture ("Outline Texture--{reference_properties:[_OutlineTexturePan, _OutlineTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineTexturePan ("Outline Texture Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _OutlineTextureUV ("UV", Int) = 0 + _OutlineMask ("Outline Mask--{reference_properties:[_OutlineMaskPan, _OutlineMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _OutlineMaskUV ("UV", Int) = 0 + _OutlineShadowStrength ("Shadow Strength", Range(0, 1)) = 1 + [Header(Hue Shift)] + [ToggleUI]_OutlineHueShift ("Hue Shift?", Float) = 0 + _OutlineHueOffset ("Shift", Range(0, 1)) = 0 + _OutlineHueOffsetSpeed ("Shift Speed", Float) = 0 + [HideInInspector] m_start_outlineAdvanced ("Advanced", Float) = 0 + _Offset_Z ("Cam Z Offset", Float) = 0 + [Vector2]_OutlineFadeDistance ("Outline distance Fade", Vector) = (0, 0, 0, 0) + [Enum(UnityEngine.Rendering.CullMode)] _OutlineCull ("Cull", Float) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Float) = 4 + _OutlineOffsetFactor ("Offset Factor", Float) = 0 + _OutlineOffsetUnits ("Offset Units", Float) = 0 + [HideInInspector] m_end_outlineAdvanced ("Advanced", Float) = 0 + + // Rendering Options + [HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 + // SPECIALFX_PROPERTIES + + // UDIM Discard + [HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 + [Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) + [HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + + // Dissolve + [HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 + [HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 + _DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + + // Point to Point Dissolve + [HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + + [HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + + // Locked in anim sldiers + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + // Flipbook + [HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 + _FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 + _FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + _FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + + //Flipbook audio link + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 + _FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + + // Flipbook Manual Control + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + //TODO Add inverts to the masks + //Emission 1 + [HideInInspector] m_start_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 + [HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + _EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + + // Center out emission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + + // Glow in the dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + + // Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 + _EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + + // Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + _EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 + _EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emissionOptions ("", Float) = 0 + + // Second Emission + [HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + _EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + + // Second Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + + // Second Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + + // Second Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 + _EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + + // Second Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + _EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 + _EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission1Options ("", Float) = 0 + + // Third Emission + [HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 + _EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 + _EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 + _EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + + // Third Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + + // Third Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 + _GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + + // Third Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 + _EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + _EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 + _EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 + _EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + + // Third Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + [Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + _EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission2Options ("", Float) = 0 + + // Fourth Emission + [HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 + [ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 + _EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 + _EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 + _EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + + // Fourth Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + + // Fourth Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 + _GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + + // Fourth Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 + _EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + _EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 + _EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 + _EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + + // Fourth Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + [Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + _EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission3Options ("", Float) = 0 + [HideInInspector] m_end_emissions ("Emissions", Float) = 0 + + // Glitter + [HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 + [Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 + _GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 + _GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 + [HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 + [ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) + _PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 + [HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 + [HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 + [HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 + [Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) + [Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) + [Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + + [Header(Timing Options)] + [Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) + [Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + + [HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + // Time Offsets + [Header(Time Offset)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + + [Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) + [HideInInspector] m_end_PathAudioLink ("", Float) = 0 + [HideInInspector] m_end_pathing ("", Float) = 0 + + // Mirror Rendering + [HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 + _MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + + [HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 + _DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 + [ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 + _DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 + _DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 + _DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 + _DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 + _DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 + _DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + + [Space(10)] + [ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 + _DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 + _DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 + _DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 + _DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 + [HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + + // Iridescence Audio Link + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + + // MSDF OVERLAY + [HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + + // FPS + [HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + + // POSITION + [HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 + //[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 + _TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + + // INSTANCE TIME + [HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + + // Poi Extras + // Audio link + [HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 + [HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 + [ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 + /* + _AudioLinkDelay ("Delay", Range(0, 1)) = 0 + [ToggleUI]_AudioLinkCCStripY("CC Strip Y UV", Float) = 0 + */ + //[ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 + //_AudioLinkAverageRange ("Average Sampling Range", Range(0, 1)) = .5 + [ThryHeaderLabel(Debug Visualizer, 13)] + [ToggleUI]_DebugWaveform("Waveform", Float) = 0 + [ToggleUI]_DebugDFT("DFT", Float) = 0 + [ToggleUI]_DebugBass("Bass", Float) = 0 + [ToggleUI]_DebugLowMids("Low Mids", Float) = 0 + [ToggleUI]_DebugHighMids("High Mids", Float) = 0 + [ToggleUI]_DebugTreble("Treble", Float) = 0 + [ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 + [ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 + [ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 + [ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 + [ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 + [Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + + [HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 + [HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 + [HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + + [ThryHeaderLabel(Transform, 13)] + [Space(4)] + [Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 + [Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) + _ALUVScale ("Scale", Vector) = (1, 1, 1, 1) + _ALUVRotation ("Rotation", Range(0, 360)) = 0 + _ALUVRotationSpeed ("Rotation Speed", Float) = 0 + _ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 + _ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + + [Space][ThryHeaderLabel(Volume, 13)] + [Space(4)] + _ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 + _ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 + _ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryHeaderLabel(Band, 13)] + [Space(4)] + _ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 + _ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 + _ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 + _ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + _ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + + [Space][ThryHeaderLabel(Audio Mods, 13)] + [Space(4)] + _ALDecalVolume ("Volume", Int) = 0.5 + _ALDecalBaseBoost ("Bass Boost", Float) = 5.0 + _ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + + [Space][ThryHeaderLabel(Colors and Blending, 13)] + [Space(4)] + [Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 + _ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) + _ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) + _ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) + _ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 + _ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 + _ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + + [HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + + // Rendering Options + [HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 + [HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 + [HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 + _DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 + _DistortionStrength ("Strength1", Float) = 0.03 + _DistortionStrength1 ("Strength2", Float) = 0.01 + [HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + + [HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 + [ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 + [ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 + [HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + + [HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 + [Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) + _PolarRadialScale ("Radial Scale", Float) = 1 + _PolarLengthScale ("Length Scale", Float) = 1 + _PolarSpiralPower ("Spiral Power", Float) = 0 + [HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 + + [HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 + [HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + + [ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + + /* + [ThryTexture]_Heightmask ("Mask--{reference_properties:[_HeightmaskPan, _HeightmaskUV, _HeightmaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightmaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_HeightmaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightmaskUV ("UV", Int) = 0 + */ + + _HeightStrength ("Strength", Range(0, 1)) = 0.4247461 + //_HeightOffset ("Offset", Range(-1, 1)) = 0 + _CurvatureU ("Curvature U", Range(0, 100)) = 0 + _CurvatureV ("Curvature V", Range(0, 30)) = 0 + [IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 + [IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 + _CurvFix ("Curvature Bias", Range(0, 1)) = 1 + // [ThryToggle]_ParallaxUV0 ("UV0", Float) = 0 + // [ThryToggle]_ParallaxUV1 ("UV1", Float) = 0 + // [ThryToggle]_ParallaxUV2 ("UV2", Float) = 0 + // [ThryToggle]_ParallaxUV3 ("UV3", Float) = 0 + // [ThryToggle]_ParallaxPano ("Panosphere", Float) = 0 + // [ThryToggle]_ParallaxWorldPos ("World Pos", Float) = 0 + // [ThryToggle]_ParallaxPolar ("Polar", Float) = 0 + // [ThryToggle]_ParallaxDist ("Distorted UV", Float) = 0 + + [HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + + // Rendering Options + [HideInInspector] m_postprocessing ("Post Processing", Float) = 0 + [HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 + [Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 + _PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 + _PPLightingAddition ("Lighting Add", Float) = 0 + _PPEmissionMultiplier ("Emission Multiplier", Float) = 1 + _PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 + [HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + + [HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 + [ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + + [NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} + _PPLUTStrength("LUT Strength", Range(0,1)) = 0 + _PPHue("Hue", Range(0,1)) = 0 + [HDR]_PPTint("Tint", Color) = (1,1,1,1) + [Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) + _PPContrast("Contrast", Float) = 1 + _PPSaturation("Saturation", Float) = 1 + _PPBrightness("Brightness", Float) = 1 + _PPLightness("Lightness", Float) = 0 + _PPHDR("HDR", Float) = 0 + + [HideInInspector] m_end_postprocess ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_renderingCategory ("Rendering", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + + // Blending Options + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + + // Stencils + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + + // Outline Stencil + [HideInInspector] m_start_OutlineStencil ("Outline Stencil", Float) = 0 + [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.StencilOp)] _OutlineStencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_OutlineStencil ("Outline Stencil", Float) = 0 + + } + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilCompareFunction] + Pass [_OutlineStencilPassOp] + Fail [_OutlineStencilFailOp] + ZFail [_OutlineStencilZFailOp] + } + + /* + ColorMask [_ColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + ZWrite [_ZWrite] + AlphaToMask [_AlphaToCoverage] + Cull [_OutlineCull] + */ + ZTest [_OutlineZTest] + Cull [_OutlineCull] + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_OUTLINE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_PASS_OUTLINE + // outline Vertex Options + float _OutlineMode; + float4 _OutlinePersonaDirection; + float4 _OutlineDropShadowOffset; + float _OutlineUseVertexColors; + float _OutlineFixedSize; + float _EnableOutlines; + float _OutlinesMaxDistance; + float _LineWidth; + float _OutlineEmission; + float4 _LineColor; + texture2D _OutlineTexture; //TODO make this dynamically not read for lock in + float4 _OutlineTexture_ST; + float2 _OutlineTexturePan; + float _OutlineTextureUV; + float4 _OutlineFadeDistance; + float4 _OutlineGlobalPan; + sampler2D _OutlineMask; + float4 _OutlineMask_ST; + float2 _OutlineMaskPan; + float _OutlineMaskUV; + float _OutlineRimLightBlend; + float _OutlineLit; + float _OutlineTintMix; + half _OutlineHueOffset; + half _OutlineHueShift; + half _OutlineHueOffsetSpeed; + float _OutlineShadowStrength; + float _LineColorThemeIndex; + float _Offset_Z; + #endif + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_PASS_OUTLINE + void applyOutlineColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + clip(_EnableOutlines - 0.01); + float OutlineMask = tex2D(_OutlineMask, TRANSFORM_TEX(poiMesh.uv[_OutlineMaskUV], _OutlineMask) + _Time.x * _OutlineMaskPan).r; + clip(OutlineMask * _LineWidth - 0.001); + float4 col = POI2D_SAMPLER_PAN(_OutlineTexture, _MainTex, poiUV(poiMesh.uv[_OutlineTextureUV], _OutlineTexture_ST), _OutlineTexturePan) * float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a); + //UNITY_BRANCH + if (_OutlineMode == 0) + { + poiFragData.baseColor = col; + } + //UNITY_BRANCH + if (_OutlineMode == 1) + { + poiFragData.baseColor = lerp(float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a), poiFragData.baseColor, _OutlineTintMix) * col; + } + //UNITY_BRANCH + if (_OutlineMode == 2) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, poiLight.directColor, _OutlineRimLightBlend) * col; + } + + poiFragData.alpha *= col.a; + + // Hue shift + //UNITY_BRANCH + if (_OutlineHueShift) + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, _OutlineHueOffset +_OutlineHueOffsetSpeed * _Time.x); + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_PASS_OUTLINE + applyOutlineColor(poiFragData, poiMesh, poiLight, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_BASE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _EMISSION + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap; + #endif + float4 _EmissionMap_ST; + float2 _EmissionMapPan; + float _EmissionMapUV; + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask; + #endif + float4 _EmissionMask_ST; + float2 _EmissionMaskPan; + float _EmissionMaskUV; + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve; + #endif + float4 _EmissionScrollingCurve_ST; + + float4 _EmissionColor; + float _EmissionBaseColorAsMap; + float _EmissionStrength; + float _EmissionHueShiftEnabled; + float _EmissionHueShift; + float _EmissionHueShiftSpeed; + float _EmissionCenterOutEnabled; + float _EmissionCenterOutSpeed; + float _EnableGITDEmission; + float _GITDEWorldOrMesh; + float _GITDEMinEmissionMultiplier; + float _GITDEMaxEmissionMultiplier; + float _GITDEMinLight; + float _GITDEMaxLight; + float _EmissionBlinkingEnabled; + float _EmissiveBlink_Min; + float _EmissiveBlink_Max; + float _EmissiveBlink_Velocity; + float _EmissionBlinkingOffset; + float _ScrollingEmission; + float4 _EmissiveScroll_Direction; + float _EmissiveScroll_Width; + float _EmissiveScroll_Velocity; + float _EmissiveScroll_Interval; + float _EmissionScrollingOffset; + + float _EmissionReplace0; + float _EmissionScrollingVertexColor; + float _EmissionScrollingUseCurve; + float _EmissionColorThemeIndex; + + // Audio Link + float _EmissionAL0Enabled; + float2 _EmissionAL0StrengthMod; + float _EmissionAL0StrengthBand; + float2 _AudioLinkEmission0CenterOut; + float _AudioLinkEmission0CenterOutwidth; + float _AudioLinkEmission0CenterOutSize; + float _AudioLinkEmission0CenterOutBand; + #endif + + #ifdef POI_EMISSION_1 + + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap1; + #endif + float4 _EmissionMap1_ST; + float2 _EmissionMap1Pan; + float _EmissionMap1UV; + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask1; + #endif + float4 _EmissionMask1_ST; + float2 _EmissionMask1Pan; + float _EmissionMask1UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve1; + #endif + float4 _EmissionScrollingCurve1_ST; + + float4 _EmissionColor1; + float _EmissionBaseColorAsMap1; + float _EmissionStrength1; + float _EnableEmission1; + float _EmissionHueShift1; + float _EmissionHueShiftSpeed1; + float4 _EmissiveScroll_Direction1; + float _EmissiveScroll_Width1; + float _EmissiveScroll_Velocity1; + float _EmissiveScroll_Interval1; + float _EmissionBlinkingEnabled1; + float _EmissiveBlink_Min1; + float _EmissiveBlink_Max1; + float _EmissiveBlink_Velocity1; + float _ScrollingEmission1; + float _EnableGITDEmission1; + float _GITDEMinEmissionMultiplier1; + float _GITDEMaxEmissionMultiplier1; + float _GITDEMinLight1; + float _GITDEMaxLight1; + float _GITDEWorldOrMesh1; + float _EmissionCenterOutEnabled1; + float _EmissionCenterOutSpeed1; + float _EmissionHueShiftEnabled1; + float _EmissionBlinkingOffset1; + float _EmissionScrollingOffset1; + float _EmissionScrollingVertexColor1; + float _EmissionScrollingUseCurve1; + float _EmissionReplace1; + float _EmissionColor1ThemeIndex; + + // Audio Link + float _EmissionAL1Enabled; + float2 _EmissionAL1StrengthMod; + float _EmissionAL1StrengthBand; + float2 _AudioLinkEmission1CenterOut; + float _AudioLinkEmission1CenterOutwidth; + float _AudioLinkEmission1CenterOutSize; + float _AudioLinkEmission1CenterOutBand; + #endif + + #ifdef POI_EMISSION_2 + + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap2; + #endif + float4 _EmissionMap2_ST; + float2 _EmissionMap2Pan; + float _EmissionMap2UV; + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask2; + #endif + float4 _EmissionMask2_ST; + float2 _EmissionMask2Pan; + float _EmissionMask2UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve2; + #endif + float4 _EmissionScrollingCurve2_ST; + + float4 _EmissionColor2; + float _EmissionBaseColorAsMap2; + float _EmissionStrength2; + float _EnableEmission2; + float _EmissionHueShift2; + float _EmissionHueShiftSpeed2; + float4 _EmissiveScroll_Direction2; + float _EmissiveScroll_Width2; + float _EmissiveScroll_Velocity2; + float _EmissiveScroll_Interval2; + float _EmissionBlinkingEnabled2; + float _EmissiveBlink_Min2; + float _EmissiveBlink_Max2; + float _EmissiveBlink_Velocity2; + float _ScrollingEmission2; + float _EnableGITDEmission2; + float _GITDEMinEmissionMultiplier2; + float _GITDEMaxEmissionMultiplier2; + float _GITDEMinLight2; + float _GITDEMaxLight2; + float _GITDEWorldOrMesh2; + float _EmissionCenterOutEnabled2; + float _EmissionCenterOutSpeed2; + float _EmissionHueShiftEnabled2; + float _EmissionBlinkingOffset2; + float _EmissionScrollingOffset2; + float _EmissionScrollingVertexColor2; + float _EmissionScrollingUseCurve2; + float _EmissionReplace2; + float _EmissionColor2ThemeIndex; + + // Audio Link + float _EmissionAL2Enabled; + float2 _EmissionAL2StrengthMod; + float _EmissionAL2StrengthBand; + float2 _AudioLinkEmission2CenterOut; + float _AudioLinkEmission2CenterOutwidth; + float _AudioLinkEmission2CenterOutSize; + float _AudioLinkEmission2CenterOutBand; + #endif + + #ifdef POI_EMISSION_3 + + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap3; + #endif + float4 _EmissionMap3_ST; + float2 _EmissionMap3Pan; + float _EmissionMap3UV; + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask3; + #endif + float4 _EmissionMask3_ST; + float2 _EmissionMask3Pan; + float _EmissionMask3UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve3; + #endif + float4 _EmissionScrollingCurve3_ST; + + float4 _EmissionColor3; + float _EmissionBaseColorAsMap3; + float _EmissionStrength3; + float _EnableEmission3; + float _EmissionHueShift3; + float _EmissionHueShiftSpeed3; + float4 _EmissiveScroll_Direction3; + float _EmissiveScroll_Width3; + float _EmissiveScroll_Velocity3; + float _EmissiveScroll_Interval3; + float _EmissionBlinkingEnabled3; + float _EmissiveBlink_Min3; + float _EmissiveBlink_Max3; + float _EmissiveBlink_Velocity3; + float _ScrollingEmission3; + float _EnableGITDEmission3; + float _GITDEMinEmissionMultiplier3; + float _GITDEMaxEmissionMultiplier3; + float _GITDEMinLight3; + float _GITDEMaxLight3; + float _GITDEWorldOrMesh3; + float _EmissionCenterOutEnabled3; + float _EmissionCenterOutSpeed3; + float _EmissionHueShiftEnabled3; + float _EmissionBlinkingOffset3; + float _EmissionScrollingOffset3; + float _EmissionScrollingVertexColor3; + float _EmissionScrollingUseCurve3; + float _EmissionReplace3; + float _EmissionColor3ThemeIndex; + + // Audio Link + float _EmissionAL3Enabled; + float2 _EmissionAL3StrengthMod; + float _EmissionAL3StrengthBand; + float2 _AudioLinkEmission3CenterOut; + float _AudioLinkEmission3CenterOutwidth; + float _AudioLinkEmission3CenterOutSize; + float _AudioLinkEmission3CenterOutBand; + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) + { + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; + } + + float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) + { + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; + } + + float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) + { + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; + } + + void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionStrengthMod.x, emissionStrengthMod.y, poiMods.audioLink[emissionStrengthBand]); + } + #endif + } + + void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionToAdd.x, emissionToAdd.y, getBandAtTime(band, saturate(1 - nDotV), width, size)); + } + #endif + } + + #ifdef _EMISSION + float3 applyEmission(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // First Emission + float3 emission0 = 0; + float emissionStrength0 = _EmissionStrength; + float3 emissionColor0 = 0; + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(_GITDEMinLight, _GITDEMaxLight, _GITDEMinEmissionMultiplier, _GITDEMaxEmissionMultiplier, _EnableGITDEmission, _GITDEWorldOrMesh, poiLight); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionMap_ST), _EmissionMapPan).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap_ST.xy) + _Time.x * _EmissionCenterOutSpeed).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + #else + emissionColor0 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + #endif + + //UNITY_BRANCH + if (_ScrollingEmission) + { + float3 pos = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor) + { + pos = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionScrollingCurve_ST) + (dot(pos, _EmissiveScroll_Direction.xyz) * _EmissiveScroll_Interval) + _Time.x * _EmissiveScroll_Velocity).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(_EmissiveScroll_Direction.xyz, _EmissiveScroll_Velocity, _EmissiveScroll_Interval, _EmissiveScroll_Width, _EmissionScrollingOffset, pos); + } + } + + //UNITY_BRANCH + if (_EmissionBlinkingEnabled) + { + emissionStrength0 *= calculateBlinkingEmission(_EmissiveBlink_Min, _EmissiveBlink_Max, _EmissiveBlink_Velocity, _EmissionBlinkingOffset); + } + + emissionColor0 = hueShift(emissionColor0, frac(_EmissionHueShift + _EmissionHueShiftSpeed * _Time.x) * _EmissionHueShiftEnabled); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, poiUV(poiMesh.uv[_EmissionMaskUV], _EmissionMask_ST) + _Time.x * _EmissionMaskPan).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission != 4) + { + emissionMask0 *= blackLightMask[_BlackLightMaskEmission]; + } + #endif + + applyALEmmissionStrength(poiMods, emissionStrength0, _EmissionAL0StrengthMod, _EmissionAL0StrengthBand, _EmissionAL0Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength0, _AudioLinkEmission0CenterOutwidth, _AudioLinkEmission0CenterOutSize, _AudioLinkEmission0CenterOutBand, _AudioLinkEmission0CenterOut, _EmissionAL0Enabled); + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = max(emissionStrength0 * emissionColor0, 0); + + #ifdef POI_DISSOLVE + //UNITY_BRANCH + if (_DissolveEmissionSide != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, _DissolveEmissionSide); + } + #endif + + // poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emission0 + emission1), _EmissionReplace * poiMax(emission0 + emission1)); + + poiFragData.emission += emission0; + return emission0 * _EmissionReplace0; + } + #endif + + #ifdef POI_EMISSION_1 + float3 applyEmission1(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + emissionStrength1 = _EmissionStrength1; + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(_GITDEMinLight1, _GITDEMaxLight1, _GITDEMinEmissionMultiplier1, _GITDEMaxEmissionMultiplier1, _EnableGITDEmission1, _GITDEWorldOrMesh1, poiLight); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled1) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionMap1_ST), _EmissionMap1Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap1_ST.xy) + _Time.x * _EmissionCenterOutSpeed1).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + #else + emissionColor1 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission1) + { + float3 pos1 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor1) + { + pos1 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve1) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionScrollingCurve1_ST) + (dot(pos1, _EmissiveScroll_Direction1) * _EmissiveScroll_Interval1) + _Time.x * _EmissiveScroll_Velocity1); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(_EmissiveScroll_Direction1, _EmissiveScroll_Velocity1, _EmissiveScroll_Interval1, _EmissiveScroll_Width1, _EmissionScrollingOffset1, pos1); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled1) + { + emissionStrength1 *= calculateBlinkingEmission(_EmissiveBlink_Min1, _EmissiveBlink_Max1, _EmissiveBlink_Velocity1, _EmissionBlinkingOffset1); + } + + emissionColor1 = hueShift(emissionColor1, frac(_EmissionHueShift1 + _EmissionHueShiftSpeed1 * _Time.x) * _EmissionHueShiftEnabled1); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, poiUV(poiMesh.uv[_EmissionMask1UV], _EmissionMask1_ST) + _Time.x * _EmissionMask1Pan); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission2 != 4) + { + emissionMask1 *= blackLightMask[_BlackLightMaskEmission2]; + } + #endif + applyALEmmissionStrength(poiMods, emissionStrength1, _EmissionAL1StrengthMod, _EmissionAL1StrengthBand, _EmissionAL1Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength1, _AudioLinkEmission1CenterOutwidth, _AudioLinkEmission1CenterOutSize, _AudioLinkEmission1CenterOutBand, _AudioLinkEmission1CenterOut, _EmissionAL1Enabled); + + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = max(emissionStrength1 * emissionColor1, 0); + + poiFragData.emission += emission1; + return emission1 * _EmissionReplace1; + } + #endif + + #ifdef POI_EMISSION_2 + float3 applyEmission2(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission2 = 0; + float emissionStrength2 = 0; + float3 emissionColor2 = 0; + + emissionStrength2 = _EmissionStrength2; + + float glowInTheDarkMultiplier2 = calculateGlowInTheDark(_GITDEMinLight2, _GITDEMaxLight2, _GITDEMinEmissionMultiplier2, _GITDEMaxEmissionMultiplier2, _EnableGITDEmission2, _GITDEWorldOrMesh2, poiLight); + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled2) + { + emissionColor2 = POI2D_SAMPLER_PAN(_EmissionMap2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionMap2_ST), _EmissionMap2Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + else + { + emissionColor2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap2, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap2_ST.xy) + _Time.x * _EmissionCenterOutSpeed2).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + #else + emissionColor2 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission2) + { + float3 pos2 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor2) + { + pos2 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve2) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + emissionStrength2 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionScrollingCurve2_ST) + (dot(pos2, _EmissiveScroll_Direction2) * _EmissiveScroll_Interval2) + _Time.x * _EmissiveScroll_Velocity2); + #endif + } + else + { + emissionStrength2 *= calculateScrollingEmission(_EmissiveScroll_Direction2, _EmissiveScroll_Velocity2, _EmissiveScroll_Interval2, _EmissiveScroll_Width2, _EmissionScrollingOffset2, pos2); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled2) + { + emissionStrength2 *= calculateBlinkingEmission(_EmissiveBlink_Min2, _EmissiveBlink_Max2, _EmissiveBlink_Velocity2, _EmissionBlinkingOffset2); + } + + emissionColor2 = hueShift(emissionColor2, frac(_EmissionHueShift2 + _EmissionHueShiftSpeed2 * _Time.x) * _EmissionHueShiftEnabled2); + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + float emissionMask2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask2, _MainTex, poiUV(poiMesh.uv[_EmissionMask2UV], _EmissionMask2_ST) + _Time.x * _EmissionMask2Pan); + #else + float emissionMask2 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask2 *= blackLightMask[_BlackLightMaskEmission2]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength2, _EmissionAL2StrengthMod, _EmissionAL2StrengthBand, _EmissionAL2Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength2, _AudioLinkEmission2CenterOutwidth, _AudioLinkEmission2CenterOutSize, _AudioLinkEmission2CenterOutBand, _AudioLinkEmission2CenterOut, _EmissionAL2Enabled); + emissionStrength2 *= glowInTheDarkMultiplier2 * emissionMask2; + emission2 = max(emissionStrength2 * emissionColor2, 0); + + poiFragData.emission += emission2; + return emission2 * _EmissionReplace2; + } + #endif + + #ifdef POI_EMISSION_3 + float3 applyEmission3(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission3 = 0; + float emissionStrength3 = 0; + float3 emissionColor3 = 0; + + emissionStrength3 = _EmissionStrength3; + + float glowInTheDarkMultiplier3 = calculateGlowInTheDark(_GITDEMinLight3, _GITDEMaxLight3, _GITDEMinEmissionMultiplier3, _GITDEMaxEmissionMultiplier3, _EnableGITDEmission3, _GITDEWorldOrMesh3, poiLight); + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled3) + { + emissionColor3 = POI2D_SAMPLER_PAN(_EmissionMap3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionMap3_ST), _EmissionMap3Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + else + { + emissionColor3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap3, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap3_ST.xy) + _Time.x * _EmissionCenterOutSpeed3).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + #else + emissionColor3 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission3) + { + float3 pos3 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor3) + { + pos3 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve3) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + emissionStrength3 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionScrollingCurve3_ST) + (dot(pos3, _EmissiveScroll_Direction3) * _EmissiveScroll_Interval3) + _Time.x * _EmissiveScroll_Velocity3); + #endif + } + else + { + emissionStrength3 *= calculateScrollingEmission(_EmissiveScroll_Direction3, _EmissiveScroll_Velocity3, _EmissiveScroll_Interval3, _EmissiveScroll_Width3, _EmissionScrollingOffset3, pos3); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled3) + { + emissionStrength3 *= calculateBlinkingEmission(_EmissiveBlink_Min3, _EmissiveBlink_Max3, _EmissiveBlink_Velocity3, _EmissionBlinkingOffset3); + } + + emissionColor3 = hueShift(emissionColor3, frac(_EmissionHueShift3 + _EmissionHueShiftSpeed3 * _Time.x) * _EmissionHueShiftEnabled3); + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + float emissionMask3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask3, _MainTex, poiUV(poiMesh.uv[_EmissionMask3UV], _EmissionMask3_ST) + _Time.x * _EmissionMask3Pan); + #else + float emissionMask3 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask3 *= blackLightMask[_BlackLightMaskEmission3]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength3, _EmissionAL3StrengthMod, _EmissionAL3StrengthBand, _EmissionAL3Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength3, _AudioLinkEmission3CenterOutwidth, _AudioLinkEmission3CenterOutSize, _AudioLinkEmission3CenterOutBand, _AudioLinkEmission3CenterOut, _EmissionAL3Enabled); + emissionStrength3 *= glowInTheDarkMultiplier3 * emissionMask3; + emission3 = max(emissionStrength3 * emissionColor3, 0); + + poiFragData.emission += emission3; + return emission3 * _EmissionReplace3; + } + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + /* + #ifdef + , out float depth : SV_DEPTH + #endif + */ + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; + #endif + + #ifdef _EMISSION + emissionBaseReplace += applyEmission(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_1 + emissionBaseReplace += applyEmission1(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_2 + emissionBaseReplace += applyEmission2(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_3 + emissionBaseReplace += applyEmission3(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); + #endif + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha; + + ApplyAlphaToCoverage(poiFragData, poiMesh); + + applyDithering(poiFragData, poiCam); + + #ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * _PPEmissionMultiplier, 0); + poiFragData.finalColor = max(poiFragData.finalColor * _PPFinalColorMultiplier, 0); + #endif + + #ifdef MOCHIE_POSTPROCESS + applyPostProcessing(poiFragData, poiMesh); + #endif + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardAdd" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite Off + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_instancing + #pragma multi_compile_fog + #define POI_PASS_ADD + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ShadowCaster" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask Off + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_instancing + #pragma multi_compile_shadowcaster + #pragma multi_compile_fog + #define POI_PASS_SHADOW + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + #ifdef GRAIN + clip(-1); + return 0; + #endif + + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + poiFragData.finalColor = poiFragData.baseColor; + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + } + CustomEditor "Thry.ShaderEditor" +} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader.meta new file mode 100644 index 00000000..ec8c8e54 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Early Outline.shader.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 1513582543e8f6c44b1981e8689f7a52 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + nonModifiableTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader new file mode 100644 index 00000000..f8513d0c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader @@ -0,0 +1,21374 @@ +Shader ".poiyomi/V8.0/Pro Grab Pass" +{ + Properties + { + [HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 + [HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 + [HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 + [HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 + [HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + + // Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + + // Main + [HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 + //Main-main + _Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 + _MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + _Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + + [HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness ("Brightness", Range(-1, 1)) = 0 + [ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 + _MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + _MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + [ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 + [ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 + _AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 + _AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 + [Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 + _AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 + _AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 + _AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + _AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 + _AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 + _AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + _AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + [ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) + _CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + + [Space(4)] + [ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 + _DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } + [HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + + [HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + + [Space(10)] + [ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + _VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + _VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + [ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + + // Back Face Textures and Emission + [HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 + [HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 + _BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _BackFaceAlpha ("Alpha", Range(0,1)) = 1 + _BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + [ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 + _BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 + _BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + + // RGBA Masking + [HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + [RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 + _RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 + _GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 + _GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 + _BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 + _BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 + _AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 + _AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + + // RGB MASKED NORMALS + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 + _RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + + // Decal Texture + [HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 + [RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 + // Decal 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 + _DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + _Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 0 Audio Link + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + // Decal 1 + //"GEOM_TYPE_FROND" + //"DEPTH_OF_FIELD_COC_VIEW" + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 + _DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + _Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 1 Audio Link + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + // Decal 2 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 + _DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + _Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 2 Audio Link + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + // Decal 3 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 + _DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + _Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 3 Audio Link + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 + _AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) + _AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) + [ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + + [HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 + _GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) + _GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) + _GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) + _GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) + [HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + + // Lighting + [HideInInspector] m_lightingCategory ("Shading", Float) = 0 + + [HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 + // Lighting Data + _LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 + [HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 + [HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 + [HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 + // Base Pass + [Space(15)] + [ThryHeaderLabel(Base Pass Lighting, 13)] + [Space(4)] + [Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 + [Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 + [Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 + [Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) + [ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 + _LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 + _Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 + [ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 + _LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 + _LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 + _LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 + _LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 + _LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 + _LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + // Lighting Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Lighting, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 + [ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 + _LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 + _LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + _LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 + // Vertex Lighting + [Space(15)] + [ThryHeaderLabel(Vertex Lighting, 13)] + [Space(4)] + [ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 + // Lighting Data Debug + [Space(15)] + [ThryHeaderLabel(Debug Visualization, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 + [ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + + [HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + + [HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 + [ThryHeaderLabel(Base Pass Shading, 13)] + [Space(4)] + [KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 + _LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } + _ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 + _LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 + _LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + + // Shade Maps + _1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + [Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 + //DJ Wrapped + _LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + // Realistic + _LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 + // Skin Shading + _SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } + _SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) + // Cloth + [NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } + [ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } + [HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 + [ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 + [Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0 + _ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35, 1)) = 0.5 + _ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0.5 + + // Generic + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=4)}", Range(0, 1)) = 1 + _LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + + // Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Shading, 13)] + [Space(4)] + [Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + //_LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 //TODO-implement this + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + + [HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + + // First Matcap + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 + [HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 + _MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + _MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + + // Second Matcap + [HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 + _Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + _Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + + // First CubeMap + [HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 + [HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 + [ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 + _CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } + _CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 + _CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 + _CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 + _CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 + _CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 + _CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 + _CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + + // Rim Lighting + [HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 + [HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 + _RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 + _RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + + [HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + + _MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 + _MochieSpecularStrength ("Specular", Range(0, 1)) = 1 + _MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 + _MochieRoughnessMultiplier ("Smoothness", Range(0, 1)) = 1 + + _MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 + _MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 + [Space(8)] + + [RGBAAtlas(Metallic Map, Smoothness Map, Reflection Mask, Specular Mask)]_MochieMetallicMaps ("Maps [Expand]--{reference_properties:[_MochieMetallicMapsPan, _MochieMetallicMapsUV, _MochieMetallicMapInvert, _MochieRoughnessMapInvert, _MochieReflectionMaskInvert, _MochieSpecularMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieMetallicMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapsUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert Metallic", Float) = 0 + [HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert Reflection Mask", Float) = 0 + [HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert Specular Mask", Float) = 0 + [Space(8)] + + [ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } + [ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 + [ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + + [HideInInspector] m_end_brdf ("", Float) = 0 + + [HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 + [HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + _ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + + _ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + + [NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + + [ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + + _ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 + _ClearCoat ("Clear Coat", Range(0, 1)) = 1 + _ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 + [ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 + [ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + + [HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 + [HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 + _RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("", Float) = 0 + + [HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 + [HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + + [ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 + _HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 + _Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } + [HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 + [HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 + [ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 + [ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + + _StylizedSpecularStrength ("Strength", Float) = 1 + [ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 1, 13)] + _HighColor_Power ("Size", Range(0, 1)) = 0.2 + _StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 + _Layer1Strength ("Strength", Range(0, 1)) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 2, 13)] + _Layer2Size ("Size", Range(0, 1)) = 0 + _StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 + _Layer2Strength ("Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_stylizedSpec ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 + // SPECIALFX_PROPERTIES + + // UDIM Discard + [HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 + [Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) + [HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + + // Dissolve + [HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 + [HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 + _DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + + // Point to Point Dissolve + [HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + + [HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + + // Locked in anim sldiers + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + // Flipbook + [HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 + _FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 + _FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + _FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + + //Flipbook audio link + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 + _FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + + // Flipbook Manual Control + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + //TODO Add inverts to the masks + //Emission 1 + [HideInInspector] m_start_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 + [HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + _EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + + // Center out emission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + + // Glow in the dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + + // Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 + _EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + + // Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + _EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 + _EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emissionOptions ("", Float) = 0 + + // Second Emission + [HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + _EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + + // Second Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + + // Second Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + + // Second Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 + _EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + + // Second Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + _EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 + _EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission1Options ("", Float) = 0 + + // Third Emission + [HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 + _EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 + _EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 + _EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + + // Third Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + + // Third Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 + _GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + + // Third Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 + _EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + _EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 + _EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 + _EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + + // Third Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + [Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + _EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission2Options ("", Float) = 0 + + // Fourth Emission + [HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 + [ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 + _EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 + _EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 + _EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + + // Fourth Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + + // Fourth Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 + _GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + + // Fourth Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 + _EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + _EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 + _EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 + _EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + + // Fourth Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + [Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + _EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission3Options ("", Float) = 0 + [HideInInspector] m_end_emissions ("Emissions", Float) = 0 + + // Glitter + [HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 + [Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 + _GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 + _GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 + [HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 + [ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) + _PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 + [HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 + [HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 + [HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 + [Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) + [Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) + [Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + + [Header(Timing Options)] + [Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) + [Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + + [HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + // Time Offsets + [Header(Time Offset)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + + [Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) + [HideInInspector] m_end_PathAudioLink ("", Float) = 0 + [HideInInspector] m_end_pathing ("", Float) = 0 + + // Mirror Rendering + [HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 + _MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + + [HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 + _DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 + [ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 + _DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 + _DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 + _DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 + _DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 + _DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 + _DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + + [Space(10)] + [ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 + _DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 + _DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 + _DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 + _DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 + [HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + + // Iridescence Audio Link + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + + // MSDF OVERLAY + [HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + + // FPS + [HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + + // POSITION + [HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 + //[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 + _TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + + // INSTANCE TIME + [HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + + // Poi Extras + // Audio link + [HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 + [HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 + [ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 + /* + _AudioLinkDelay ("Delay", Range(0, 1)) = 0 + [ToggleUI]_AudioLinkCCStripY("CC Strip Y UV", Float) = 0 + */ + //[ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 + //_AudioLinkAverageRange ("Average Sampling Range", Range(0, 1)) = .5 + [ThryHeaderLabel(Debug Visualizer, 13)] + [ToggleUI]_DebugWaveform("Waveform", Float) = 0 + [ToggleUI]_DebugDFT("DFT", Float) = 0 + [ToggleUI]_DebugBass("Bass", Float) = 0 + [ToggleUI]_DebugLowMids("Low Mids", Float) = 0 + [ToggleUI]_DebugHighMids("High Mids", Float) = 0 + [ToggleUI]_DebugTreble("Treble", Float) = 0 + [ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 + [ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 + [ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 + [ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 + [ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 + [Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + + [HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 + [HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 + [HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + + [ThryHeaderLabel(Transform, 13)] + [Space(4)] + [Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 + [Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) + _ALUVScale ("Scale", Vector) = (1, 1, 1, 1) + _ALUVRotation ("Rotation", Range(0, 360)) = 0 + _ALUVRotationSpeed ("Rotation Speed", Float) = 0 + _ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 + _ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + + [Space][ThryHeaderLabel(Volume, 13)] + [Space(4)] + _ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 + _ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 + _ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryHeaderLabel(Band, 13)] + [Space(4)] + _ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 + _ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 + _ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 + _ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + _ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + + [Space][ThryHeaderLabel(Audio Mods, 13)] + [Space(4)] + _ALDecalVolume ("Volume", Int) = 0.5 + _ALDecalBaseBoost ("Bass Boost", Float) = 5.0 + _ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + + [Space][ThryHeaderLabel(Colors and Blending, 13)] + [Space(4)] + [Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 + _ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) + _ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) + _ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) + _ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 + _ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 + _ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + + [HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + + // Rendering Options + [HideInInspector] m_grabPassCategory ("Grab Pass", Float) = 0 + [HideInInspector] m_start_GrabPass ("GrabPass Transparency--{reference_property:_EnableGrabpass}", Float) = 0 + [HideInInspector][ToggleUI] _EnableGrabpass ("Enable GrabPass", Float) = 1 + [ToggleUI]_GrabPassUseAlpha ("Use Alpha", Float) = 1 + _GrabPassBlendMap ("Blend Map--{reference_properties:[_GrabPassBlendMapPan, _GrabPassBlendMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GrabPassBlendMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, distorteduv0, 4)] _GrabPassBlendMapUV ("UV", Int) = 0 + _GrabPassBlendFactor ("Blend Amount", Range(0, 1)) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _GrabSrcBlend ("Source Blend", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _GrabDstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_start_Refraction ("Refraction--{reference_property:_RefractionEnabled}", Float) = 0 + [ToggleUI] _RefractionEnabled ("Enable Refraction,", Float) = 0 + _RefractionIndex ("Refraction", Range(0, 3)) = 1.333333 + _RefractionChromaticAberattion ("Chromatic Aberration", Range(0, 1)) = 0 + [HideInInspector] m_end_Refraction ("Refraction", Float) = 0 + [HideInInspector] m_start_Blur ("Blur--{reference_property:_EnableBlur}", Float) = 0 + [HideInInspector][ThryToggle(CHROMATIC_ABERRATION_LOW)]_EnableBlur ("Enable Blur", Float) = 0 + _GrabBlurDistance ("Blur Distance", Range(0, 1)) = 0 + [IntRange]_GrabBlurQuality ("Blur Quality", Range(1, 10)) = 2 + [IntRange]_GrabBlurDirections ("Blur Directions", Range(1, 10)) = 4 + [HideInInspector] m_end_Blur ("Blur", Float) = 0 + [HideInInspector] m_end_GrabPass ("GrabPass Transparency", Float) = 0 + + // Rendering Options + [HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 + [HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 + [HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 + _DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 + _DistortionStrength ("Strength1", Float) = 0.03 + _DistortionStrength1 ("Strength2", Float) = 0.01 + [HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + + [HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 + [ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 + [ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 + [HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + + [HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 + [Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) + _PolarRadialScale ("Radial Scale", Float) = 1 + _PolarLengthScale ("Length Scale", Float) = 1 + _PolarSpiralPower ("Spiral Power", Float) = 0 + [HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 + + [HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 + [HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + + [ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + + /* + [ThryTexture]_Heightmask ("Mask--{reference_properties:[_HeightmaskPan, _HeightmaskUV, _HeightmaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightmaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_HeightmaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightmaskUV ("UV", Int) = 0 + */ + + _HeightStrength ("Strength", Range(0, 1)) = 0.4247461 + //_HeightOffset ("Offset", Range(-1, 1)) = 0 + _CurvatureU ("Curvature U", Range(0, 100)) = 0 + _CurvatureV ("Curvature V", Range(0, 30)) = 0 + [IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 + [IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 + _CurvFix ("Curvature Bias", Range(0, 1)) = 1 + // [ThryToggle]_ParallaxUV0 ("UV0", Float) = 0 + // [ThryToggle]_ParallaxUV1 ("UV1", Float) = 0 + // [ThryToggle]_ParallaxUV2 ("UV2", Float) = 0 + // [ThryToggle]_ParallaxUV3 ("UV3", Float) = 0 + // [ThryToggle]_ParallaxPano ("Panosphere", Float) = 0 + // [ThryToggle]_ParallaxWorldPos ("World Pos", Float) = 0 + // [ThryToggle]_ParallaxPolar ("Polar", Float) = 0 + // [ThryToggle]_ParallaxDist ("Distorted UV", Float) = 0 + + [HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + + // Rendering Options + [HideInInspector] m_postprocessing ("Post Processing", Float) = 0 + [HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 + [Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 + _PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 + _PPLightingAddition ("Lighting Add", Float) = 0 + _PPEmissionMultiplier ("Emission Multiplier", Float) = 1 + _PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 + [HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + + [HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 + [ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + + [NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} + _PPLUTStrength("LUT Strength", Range(0,1)) = 0 + _PPHue("Hue", Range(0,1)) = 0 + [HDR]_PPTint("Tint", Color) = (1,1,1,1) + [Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) + _PPContrast("Contrast", Float) = 1 + _PPSaturation("Saturation", Float) = 1 + _PPBrightness("Brightness", Float) = 1 + _PPLightness("Lightness", Float) = 0 + _PPHDR("HDR", Float) = 0 + + [HideInInspector] m_end_postprocess ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_renderingCategory ("Rendering", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + + // Blending Options + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + + // Stencils + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + + } + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + + //EnableGrabpass + GrabPass + { + "_PoiGrab2" + } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature CHROMATIC_ABERRATION_LOW + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_BASE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _EMISSION + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap; + #endif + float4 _EmissionMap_ST; + float2 _EmissionMapPan; + float _EmissionMapUV; + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask; + #endif + float4 _EmissionMask_ST; + float2 _EmissionMaskPan; + float _EmissionMaskUV; + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve; + #endif + float4 _EmissionScrollingCurve_ST; + + float4 _EmissionColor; + float _EmissionBaseColorAsMap; + float _EmissionStrength; + float _EmissionHueShiftEnabled; + float _EmissionHueShift; + float _EmissionHueShiftSpeed; + float _EmissionCenterOutEnabled; + float _EmissionCenterOutSpeed; + float _EnableGITDEmission; + float _GITDEWorldOrMesh; + float _GITDEMinEmissionMultiplier; + float _GITDEMaxEmissionMultiplier; + float _GITDEMinLight; + float _GITDEMaxLight; + float _EmissionBlinkingEnabled; + float _EmissiveBlink_Min; + float _EmissiveBlink_Max; + float _EmissiveBlink_Velocity; + float _EmissionBlinkingOffset; + float _ScrollingEmission; + float4 _EmissiveScroll_Direction; + float _EmissiveScroll_Width; + float _EmissiveScroll_Velocity; + float _EmissiveScroll_Interval; + float _EmissionScrollingOffset; + + float _EmissionReplace0; + float _EmissionScrollingVertexColor; + float _EmissionScrollingUseCurve; + float _EmissionColorThemeIndex; + + // Audio Link + float _EmissionAL0Enabled; + float2 _EmissionAL0StrengthMod; + float _EmissionAL0StrengthBand; + float2 _AudioLinkEmission0CenterOut; + float _AudioLinkEmission0CenterOutwidth; + float _AudioLinkEmission0CenterOutSize; + float _AudioLinkEmission0CenterOutBand; + #endif + + #ifdef POI_EMISSION_1 + + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap1; + #endif + float4 _EmissionMap1_ST; + float2 _EmissionMap1Pan; + float _EmissionMap1UV; + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask1; + #endif + float4 _EmissionMask1_ST; + float2 _EmissionMask1Pan; + float _EmissionMask1UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve1; + #endif + float4 _EmissionScrollingCurve1_ST; + + float4 _EmissionColor1; + float _EmissionBaseColorAsMap1; + float _EmissionStrength1; + float _EnableEmission1; + float _EmissionHueShift1; + float _EmissionHueShiftSpeed1; + float4 _EmissiveScroll_Direction1; + float _EmissiveScroll_Width1; + float _EmissiveScroll_Velocity1; + float _EmissiveScroll_Interval1; + float _EmissionBlinkingEnabled1; + float _EmissiveBlink_Min1; + float _EmissiveBlink_Max1; + float _EmissiveBlink_Velocity1; + float _ScrollingEmission1; + float _EnableGITDEmission1; + float _GITDEMinEmissionMultiplier1; + float _GITDEMaxEmissionMultiplier1; + float _GITDEMinLight1; + float _GITDEMaxLight1; + float _GITDEWorldOrMesh1; + float _EmissionCenterOutEnabled1; + float _EmissionCenterOutSpeed1; + float _EmissionHueShiftEnabled1; + float _EmissionBlinkingOffset1; + float _EmissionScrollingOffset1; + float _EmissionScrollingVertexColor1; + float _EmissionScrollingUseCurve1; + float _EmissionReplace1; + float _EmissionColor1ThemeIndex; + + // Audio Link + float _EmissionAL1Enabled; + float2 _EmissionAL1StrengthMod; + float _EmissionAL1StrengthBand; + float2 _AudioLinkEmission1CenterOut; + float _AudioLinkEmission1CenterOutwidth; + float _AudioLinkEmission1CenterOutSize; + float _AudioLinkEmission1CenterOutBand; + #endif + + #ifdef POI_EMISSION_2 + + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap2; + #endif + float4 _EmissionMap2_ST; + float2 _EmissionMap2Pan; + float _EmissionMap2UV; + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask2; + #endif + float4 _EmissionMask2_ST; + float2 _EmissionMask2Pan; + float _EmissionMask2UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve2; + #endif + float4 _EmissionScrollingCurve2_ST; + + float4 _EmissionColor2; + float _EmissionBaseColorAsMap2; + float _EmissionStrength2; + float _EnableEmission2; + float _EmissionHueShift2; + float _EmissionHueShiftSpeed2; + float4 _EmissiveScroll_Direction2; + float _EmissiveScroll_Width2; + float _EmissiveScroll_Velocity2; + float _EmissiveScroll_Interval2; + float _EmissionBlinkingEnabled2; + float _EmissiveBlink_Min2; + float _EmissiveBlink_Max2; + float _EmissiveBlink_Velocity2; + float _ScrollingEmission2; + float _EnableGITDEmission2; + float _GITDEMinEmissionMultiplier2; + float _GITDEMaxEmissionMultiplier2; + float _GITDEMinLight2; + float _GITDEMaxLight2; + float _GITDEWorldOrMesh2; + float _EmissionCenterOutEnabled2; + float _EmissionCenterOutSpeed2; + float _EmissionHueShiftEnabled2; + float _EmissionBlinkingOffset2; + float _EmissionScrollingOffset2; + float _EmissionScrollingVertexColor2; + float _EmissionScrollingUseCurve2; + float _EmissionReplace2; + float _EmissionColor2ThemeIndex; + + // Audio Link + float _EmissionAL2Enabled; + float2 _EmissionAL2StrengthMod; + float _EmissionAL2StrengthBand; + float2 _AudioLinkEmission2CenterOut; + float _AudioLinkEmission2CenterOutwidth; + float _AudioLinkEmission2CenterOutSize; + float _AudioLinkEmission2CenterOutBand; + #endif + + #ifdef POI_EMISSION_3 + + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap3; + #endif + float4 _EmissionMap3_ST; + float2 _EmissionMap3Pan; + float _EmissionMap3UV; + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask3; + #endif + float4 _EmissionMask3_ST; + float2 _EmissionMask3Pan; + float _EmissionMask3UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve3; + #endif + float4 _EmissionScrollingCurve3_ST; + + float4 _EmissionColor3; + float _EmissionBaseColorAsMap3; + float _EmissionStrength3; + float _EnableEmission3; + float _EmissionHueShift3; + float _EmissionHueShiftSpeed3; + float4 _EmissiveScroll_Direction3; + float _EmissiveScroll_Width3; + float _EmissiveScroll_Velocity3; + float _EmissiveScroll_Interval3; + float _EmissionBlinkingEnabled3; + float _EmissiveBlink_Min3; + float _EmissiveBlink_Max3; + float _EmissiveBlink_Velocity3; + float _ScrollingEmission3; + float _EnableGITDEmission3; + float _GITDEMinEmissionMultiplier3; + float _GITDEMaxEmissionMultiplier3; + float _GITDEMinLight3; + float _GITDEMaxLight3; + float _GITDEWorldOrMesh3; + float _EmissionCenterOutEnabled3; + float _EmissionCenterOutSpeed3; + float _EmissionHueShiftEnabled3; + float _EmissionBlinkingOffset3; + float _EmissionScrollingOffset3; + float _EmissionScrollingVertexColor3; + float _EmissionScrollingUseCurve3; + float _EmissionReplace3; + float _EmissionColor3ThemeIndex; + + // Audio Link + float _EmissionAL3Enabled; + float2 _EmissionAL3StrengthMod; + float _EmissionAL3StrengthBand; + float2 _AudioLinkEmission3CenterOut; + float _AudioLinkEmission3CenterOutwidth; + float _AudioLinkEmission3CenterOutSize; + float _AudioLinkEmission3CenterOutBand; + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + sampler2D _PoiGrab2; // Grabpass texture + float _RefractionIndex; + float _RefractionOpacity; + float _RefractionChromaticAberattion; + float _RefractionEnabled; + float _GrabSrcBlend; + float _GrabDstBlend; + float _GrabPassUseAlpha; + float _GrabPassBlendFactor; + float _GrabBlurDistance; + float _GrabBlurQuality; + float _GrabBlurDirections; + + #if defined(PROP_GRABPASSBLENDMAP) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _GrabPassBlendMap; + float4 _GrabPassBlendMap_ST; + float2 _GrabPassBlendMapPan; + float _GrabPassBlendMapUV; + float _EnableGrabpass; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) + { + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; + } + + float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) + { + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; + } + + float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) + { + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; + } + + void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionStrengthMod.x, emissionStrengthMod.y, poiMods.audioLink[emissionStrengthBand]); + } + #endif + } + + void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionToAdd.x, emissionToAdd.y, getBandAtTime(band, saturate(1 - nDotV), width, size)); + } + #endif + } + + #ifdef _EMISSION + float3 applyEmission(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // First Emission + float3 emission0 = 0; + float emissionStrength0 = _EmissionStrength; + float3 emissionColor0 = 0; + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(_GITDEMinLight, _GITDEMaxLight, _GITDEMinEmissionMultiplier, _GITDEMaxEmissionMultiplier, _EnableGITDEmission, _GITDEWorldOrMesh, poiLight); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionMap_ST), _EmissionMapPan).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap_ST.xy) + _Time.x * _EmissionCenterOutSpeed).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + #else + emissionColor0 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + #endif + + //UNITY_BRANCH + if (_ScrollingEmission) + { + float3 pos = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor) + { + pos = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionScrollingCurve_ST) + (dot(pos, _EmissiveScroll_Direction.xyz) * _EmissiveScroll_Interval) + _Time.x * _EmissiveScroll_Velocity).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(_EmissiveScroll_Direction.xyz, _EmissiveScroll_Velocity, _EmissiveScroll_Interval, _EmissiveScroll_Width, _EmissionScrollingOffset, pos); + } + } + + //UNITY_BRANCH + if (_EmissionBlinkingEnabled) + { + emissionStrength0 *= calculateBlinkingEmission(_EmissiveBlink_Min, _EmissiveBlink_Max, _EmissiveBlink_Velocity, _EmissionBlinkingOffset); + } + + emissionColor0 = hueShift(emissionColor0, frac(_EmissionHueShift + _EmissionHueShiftSpeed * _Time.x) * _EmissionHueShiftEnabled); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, poiUV(poiMesh.uv[_EmissionMaskUV], _EmissionMask_ST) + _Time.x * _EmissionMaskPan).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission != 4) + { + emissionMask0 *= blackLightMask[_BlackLightMaskEmission]; + } + #endif + + applyALEmmissionStrength(poiMods, emissionStrength0, _EmissionAL0StrengthMod, _EmissionAL0StrengthBand, _EmissionAL0Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength0, _AudioLinkEmission0CenterOutwidth, _AudioLinkEmission0CenterOutSize, _AudioLinkEmission0CenterOutBand, _AudioLinkEmission0CenterOut, _EmissionAL0Enabled); + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = max(emissionStrength0 * emissionColor0, 0); + + #ifdef POI_DISSOLVE + //UNITY_BRANCH + if (_DissolveEmissionSide != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, _DissolveEmissionSide); + } + #endif + + // poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emission0 + emission1), _EmissionReplace * poiMax(emission0 + emission1)); + + poiFragData.emission += emission0; + return emission0 * _EmissionReplace0; + } + #endif + + #ifdef POI_EMISSION_1 + float3 applyEmission1(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + emissionStrength1 = _EmissionStrength1; + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(_GITDEMinLight1, _GITDEMaxLight1, _GITDEMinEmissionMultiplier1, _GITDEMaxEmissionMultiplier1, _EnableGITDEmission1, _GITDEWorldOrMesh1, poiLight); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled1) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionMap1_ST), _EmissionMap1Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap1_ST.xy) + _Time.x * _EmissionCenterOutSpeed1).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + #else + emissionColor1 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission1) + { + float3 pos1 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor1) + { + pos1 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve1) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionScrollingCurve1_ST) + (dot(pos1, _EmissiveScroll_Direction1) * _EmissiveScroll_Interval1) + _Time.x * _EmissiveScroll_Velocity1); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(_EmissiveScroll_Direction1, _EmissiveScroll_Velocity1, _EmissiveScroll_Interval1, _EmissiveScroll_Width1, _EmissionScrollingOffset1, pos1); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled1) + { + emissionStrength1 *= calculateBlinkingEmission(_EmissiveBlink_Min1, _EmissiveBlink_Max1, _EmissiveBlink_Velocity1, _EmissionBlinkingOffset1); + } + + emissionColor1 = hueShift(emissionColor1, frac(_EmissionHueShift1 + _EmissionHueShiftSpeed1 * _Time.x) * _EmissionHueShiftEnabled1); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, poiUV(poiMesh.uv[_EmissionMask1UV], _EmissionMask1_ST) + _Time.x * _EmissionMask1Pan); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission2 != 4) + { + emissionMask1 *= blackLightMask[_BlackLightMaskEmission2]; + } + #endif + applyALEmmissionStrength(poiMods, emissionStrength1, _EmissionAL1StrengthMod, _EmissionAL1StrengthBand, _EmissionAL1Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength1, _AudioLinkEmission1CenterOutwidth, _AudioLinkEmission1CenterOutSize, _AudioLinkEmission1CenterOutBand, _AudioLinkEmission1CenterOut, _EmissionAL1Enabled); + + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = max(emissionStrength1 * emissionColor1, 0); + + poiFragData.emission += emission1; + return emission1 * _EmissionReplace1; + } + #endif + + #ifdef POI_EMISSION_2 + float3 applyEmission2(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission2 = 0; + float emissionStrength2 = 0; + float3 emissionColor2 = 0; + + emissionStrength2 = _EmissionStrength2; + + float glowInTheDarkMultiplier2 = calculateGlowInTheDark(_GITDEMinLight2, _GITDEMaxLight2, _GITDEMinEmissionMultiplier2, _GITDEMaxEmissionMultiplier2, _EnableGITDEmission2, _GITDEWorldOrMesh2, poiLight); + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled2) + { + emissionColor2 = POI2D_SAMPLER_PAN(_EmissionMap2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionMap2_ST), _EmissionMap2Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + else + { + emissionColor2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap2, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap2_ST.xy) + _Time.x * _EmissionCenterOutSpeed2).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + #else + emissionColor2 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission2) + { + float3 pos2 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor2) + { + pos2 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve2) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + emissionStrength2 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionScrollingCurve2_ST) + (dot(pos2, _EmissiveScroll_Direction2) * _EmissiveScroll_Interval2) + _Time.x * _EmissiveScroll_Velocity2); + #endif + } + else + { + emissionStrength2 *= calculateScrollingEmission(_EmissiveScroll_Direction2, _EmissiveScroll_Velocity2, _EmissiveScroll_Interval2, _EmissiveScroll_Width2, _EmissionScrollingOffset2, pos2); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled2) + { + emissionStrength2 *= calculateBlinkingEmission(_EmissiveBlink_Min2, _EmissiveBlink_Max2, _EmissiveBlink_Velocity2, _EmissionBlinkingOffset2); + } + + emissionColor2 = hueShift(emissionColor2, frac(_EmissionHueShift2 + _EmissionHueShiftSpeed2 * _Time.x) * _EmissionHueShiftEnabled2); + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + float emissionMask2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask2, _MainTex, poiUV(poiMesh.uv[_EmissionMask2UV], _EmissionMask2_ST) + _Time.x * _EmissionMask2Pan); + #else + float emissionMask2 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask2 *= blackLightMask[_BlackLightMaskEmission2]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength2, _EmissionAL2StrengthMod, _EmissionAL2StrengthBand, _EmissionAL2Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength2, _AudioLinkEmission2CenterOutwidth, _AudioLinkEmission2CenterOutSize, _AudioLinkEmission2CenterOutBand, _AudioLinkEmission2CenterOut, _EmissionAL2Enabled); + emissionStrength2 *= glowInTheDarkMultiplier2 * emissionMask2; + emission2 = max(emissionStrength2 * emissionColor2, 0); + + poiFragData.emission += emission2; + return emission2 * _EmissionReplace2; + } + #endif + + #ifdef POI_EMISSION_3 + float3 applyEmission3(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission3 = 0; + float emissionStrength3 = 0; + float3 emissionColor3 = 0; + + emissionStrength3 = _EmissionStrength3; + + float glowInTheDarkMultiplier3 = calculateGlowInTheDark(_GITDEMinLight3, _GITDEMaxLight3, _GITDEMinEmissionMultiplier3, _GITDEMaxEmissionMultiplier3, _EnableGITDEmission3, _GITDEWorldOrMesh3, poiLight); + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled3) + { + emissionColor3 = POI2D_SAMPLER_PAN(_EmissionMap3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionMap3_ST), _EmissionMap3Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + else + { + emissionColor3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap3, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap3_ST.xy) + _Time.x * _EmissionCenterOutSpeed3).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + #else + emissionColor3 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission3) + { + float3 pos3 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor3) + { + pos3 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve3) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + emissionStrength3 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionScrollingCurve3_ST) + (dot(pos3, _EmissiveScroll_Direction3) * _EmissiveScroll_Interval3) + _Time.x * _EmissiveScroll_Velocity3); + #endif + } + else + { + emissionStrength3 *= calculateScrollingEmission(_EmissiveScroll_Direction3, _EmissiveScroll_Velocity3, _EmissiveScroll_Interval3, _EmissiveScroll_Width3, _EmissionScrollingOffset3, pos3); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled3) + { + emissionStrength3 *= calculateBlinkingEmission(_EmissiveBlink_Min3, _EmissiveBlink_Max3, _EmissiveBlink_Velocity3, _EmissionBlinkingOffset3); + } + + emissionColor3 = hueShift(emissionColor3, frac(_EmissionHueShift3 + _EmissionHueShiftSpeed3 * _Time.x) * _EmissionHueShiftEnabled3); + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + float emissionMask3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask3, _MainTex, poiUV(poiMesh.uv[_EmissionMask3UV], _EmissionMask3_ST) + _Time.x * _EmissionMask3Pan); + #else + float emissionMask3 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask3 *= blackLightMask[_BlackLightMaskEmission3]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength3, _EmissionAL3StrengthMod, _EmissionAL3StrengthBand, _EmissionAL3Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength3, _AudioLinkEmission3CenterOutwidth, _AudioLinkEmission3CenterOutSize, _AudioLinkEmission3CenterOutBand, _AudioLinkEmission3CenterOut, _EmissionAL3Enabled); + emissionStrength3 *= glowInTheDarkMultiplier3 * emissionMask3; + emission3 = max(emissionStrength3 * emissionColor3, 0); + + poiFragData.emission += emission3; + return emission3 * _EmissionReplace3; + } + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + float4 blur(float2 uv) + { + float two_pi = 6.28318530718; + + float2 radius = _GrabBlurDistance / _ScreenParams.xy * 100; // Arbitrary constant to match old blur + float quality = floor(_GrabBlurQuality); + float directions = floor(_GrabBlurDirections); + + // Pixel colour + float4 color = tex2D(_PoiGrab2, uv); + + float deltaAngle = two_pi / directions; + float deltaQuality = 1.0 / quality; + for (int i = 0; i < directions; i++) + { + for (int j = 0; j < quality; j++) + { + float angle = deltaAngle * i + j; + float offset = deltaQuality * (j + 1); + color += tex2D(_PoiGrab2, uv + float2(cos(angle), sin(angle)) * radius * offset); + } + } + + // Output to screen + color /= quality * directions + 1; + return color; + } + + inline float4 Refraction(float indexOfRefraction, float chromaticAberration, float2 projectedGrabPos, in PoiMesh poiMesh, in PoiCam poiCam) + { + float4 refractionColor; + float3 worldViewDir = normalize(UnityWorldSpaceViewDir(poiMesh.worldPos)); + float3 refractionOffset = ((((indexOfRefraction - 1.0) * mul(UNITY_MATRIX_V, float4(poiMesh.normals[1], 0.0)).xyz) * (1.0 / (poiCam.grabPos.z + 1.0))) * (1.0 - dot(poiMesh.normals[1], worldViewDir))); + float2 cameraRefraction = float2(refractionOffset.x, - (refractionOffset.y * _ProjectionParams.x)); + + UNITY_BRANCH + if (_RefractionChromaticAberattion > 0) + { + float4 redAlpha = tex2D(_PoiGrab2, (projectedGrabPos + cameraRefraction)); + float green = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 - chromaticAberration)))).g; + float blue = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 + chromaticAberration)))).b; + refractionColor = float4(redAlpha.r, green, blue, redAlpha.a); + } + else + { + float2 refractedGrab = projectedGrabPos + cameraRefraction; + + #ifdef CHROMATIC_ABERRATION_LOW + refractionColor = blur(refractedGrab); + #else + refractionColor = tex2D(_PoiGrab2, (refractedGrab)); + #endif + } + return refractionColor; + } + + void calculateRefraction(float2 projectedGrabPos, inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) + { + float3 refraction = 1; + UNITY_BRANCH + if (_RefractionEnabled == 1) + { + refraction = Refraction(_RefractionIndex, _RefractionChromaticAberattion, projectedGrabPos, poiMesh, poiCam).rgb; + } + else + { + #ifdef CHROMATIC_ABERRATION_LOW + refraction = blur(projectedGrabPos); + #else + refraction = tex2Dproj(_PoiGrab2, poiCam.grabPos).rgb; + #endif + } + + float blendTexture = POI2D_SAMPLER_PAN(_GrabPassBlendMap, _MainTex, poiUV(poiMesh.uv[_GrabPassBlendMapUV], _GrabPassBlendMap_ST), _GrabPassBlendMapPan).r; + float blendFactor = _GrabPassBlendFactor * blendTexture; + + UNITY_BRANCH + if (_GrabPassUseAlpha) + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor)); + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor))); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor * (1 - poiFragData.alpha)); + poiFragData.baseColor = poiFragData.finalColor; + } + else + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= 1 - blendFactor; + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, 1 - blendFactor); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor); + poiFragData.baseColor = poiFragData.finalColor; + } + } + + float2 calculateGrabPosition(in PoiCam poiCam) + { + float4 grabPos = poiCam.grabPos; + #if UNITY_UV_STARTS_AT_TOP + float scale = -1.0; + #else + float scale = 1.0; + #endif + float halfPosW = grabPos.w * 0.5; + grabPos.y = (grabPos.y - halfPosW) * _ProjectionParams.x * scale + halfPosW; + #if SHADER_API_D3D9 || SHADER_API_D3D11 + grabPos.w += 0.00000000001; + #endif + return(grabPos / grabPos.w).xy; + } + + void applyGrabEffects(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) + { + float2 projectedGrabPos = calculateGrabPosition(poiCam); + calculateRefraction(projectedGrabPos, poiFragData, poiCam, poiMesh, poiLight); + } + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + /* + #ifdef + , out float depth : SV_DEPTH + #endif + */ + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + if (_EnableGrabpass) + { + applyGrabEffects(poiFragData, poiCam, poiMesh, poiLight); + poiFragData.alpha = 1; + } + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; + #endif + + #ifdef _EMISSION + emissionBaseReplace += applyEmission(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_1 + emissionBaseReplace += applyEmission1(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_2 + emissionBaseReplace += applyEmission2(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_3 + emissionBaseReplace += applyEmission3(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); + #endif + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha; + + ApplyAlphaToCoverage(poiFragData, poiMesh); + + applyDithering(poiFragData, poiCam); + + #ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * _PPEmissionMultiplier, 0); + poiFragData.finalColor = max(poiFragData.finalColor * _PPFinalColorMultiplier, 0); + #endif + + #ifdef MOCHIE_POSTPROCESS + applyPostProcessing(poiFragData, poiMesh); + #endif + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardAdd" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite Off + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature CHROMATIC_ABERRATION_LOW + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_instancing + #pragma multi_compile_fog + #define POI_PASS_ADD + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + sampler2D _PoiGrab2; // Grabpass texture + float _RefractionIndex; + float _RefractionOpacity; + float _RefractionChromaticAberattion; + float _RefractionEnabled; + float _GrabSrcBlend; + float _GrabDstBlend; + float _GrabPassUseAlpha; + float _GrabPassBlendFactor; + float _GrabBlurDistance; + float _GrabBlurQuality; + float _GrabBlurDirections; + + #if defined(PROP_GRABPASSBLENDMAP) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _GrabPassBlendMap; + float4 _GrabPassBlendMap_ST; + float2 _GrabPassBlendMapPan; + float _GrabPassBlendMapUV; + float _EnableGrabpass; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + float4 blur(float2 uv) + { + float two_pi = 6.28318530718; + + float2 radius = _GrabBlurDistance / _ScreenParams.xy * 100; // Arbitrary constant to match old blur + float quality = floor(_GrabBlurQuality); + float directions = floor(_GrabBlurDirections); + + // Pixel colour + float4 color = tex2D(_PoiGrab2, uv); + + float deltaAngle = two_pi / directions; + float deltaQuality = 1.0 / quality; + for (int i = 0; i < directions; i++) + { + for (int j = 0; j < quality; j++) + { + float angle = deltaAngle * i + j; + float offset = deltaQuality * (j + 1); + color += tex2D(_PoiGrab2, uv + float2(cos(angle), sin(angle)) * radius * offset); + } + } + + // Output to screen + color /= quality * directions + 1; + return color; + } + + inline float4 Refraction(float indexOfRefraction, float chromaticAberration, float2 projectedGrabPos, in PoiMesh poiMesh, in PoiCam poiCam) + { + float4 refractionColor; + float3 worldViewDir = normalize(UnityWorldSpaceViewDir(poiMesh.worldPos)); + float3 refractionOffset = ((((indexOfRefraction - 1.0) * mul(UNITY_MATRIX_V, float4(poiMesh.normals[1], 0.0)).xyz) * (1.0 / (poiCam.grabPos.z + 1.0))) * (1.0 - dot(poiMesh.normals[1], worldViewDir))); + float2 cameraRefraction = float2(refractionOffset.x, - (refractionOffset.y * _ProjectionParams.x)); + + UNITY_BRANCH + if (_RefractionChromaticAberattion > 0) + { + float4 redAlpha = tex2D(_PoiGrab2, (projectedGrabPos + cameraRefraction)); + float green = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 - chromaticAberration)))).g; + float blue = tex2D(_PoiGrab2, (projectedGrabPos + (cameraRefraction * (1.0 + chromaticAberration)))).b; + refractionColor = float4(redAlpha.r, green, blue, redAlpha.a); + } + else + { + float2 refractedGrab = projectedGrabPos + cameraRefraction; + + #ifdef CHROMATIC_ABERRATION_LOW + refractionColor = blur(refractedGrab); + #else + refractionColor = tex2D(_PoiGrab2, (refractedGrab)); + #endif + } + return refractionColor; + } + + void calculateRefraction(float2 projectedGrabPos, inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) + { + float3 refraction = 1; + UNITY_BRANCH + if (_RefractionEnabled == 1) + { + refraction = Refraction(_RefractionIndex, _RefractionChromaticAberattion, projectedGrabPos, poiMesh, poiCam).rgb; + } + else + { + #ifdef CHROMATIC_ABERRATION_LOW + refraction = blur(projectedGrabPos); + #else + refraction = tex2Dproj(_PoiGrab2, poiCam.grabPos).rgb; + #endif + } + + float blendTexture = POI2D_SAMPLER_PAN(_GrabPassBlendMap, _MainTex, poiUV(poiMesh.uv[_GrabPassBlendMapUV], _GrabPassBlendMap_ST), _GrabPassBlendMapPan).r; + float blendFactor = _GrabPassBlendFactor * blendTexture; + + UNITY_BRANCH + if (_GrabPassUseAlpha) + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor)); + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, max((1 - blendFactor), lerp(1, poiFragData.alpha, _GrabPassBlendFactor))); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor * (1 - poiFragData.alpha)); + poiFragData.baseColor = poiFragData.finalColor; + } + else + { + #ifdef UNITY_PASS_FORWARDADD + poiLight.finalLighting *= 1 - blendFactor; + #else + poiLight.finalLighting = lerp(1, poiLight.finalLighting, 1 - blendFactor); + #endif + poiFragData.finalColor = poiBlend(_GrabSrcBlend, float4(poiFragData.finalColor, poiFragData.alpha), _GrabDstBlend, float4(refraction, 1), blendFactor); + poiFragData.baseColor = poiFragData.finalColor; + } + } + + float2 calculateGrabPosition(in PoiCam poiCam) + { + float4 grabPos = poiCam.grabPos; + #if UNITY_UV_STARTS_AT_TOP + float scale = -1.0; + #else + float scale = 1.0; + #endif + float halfPosW = grabPos.w * 0.5; + grabPos.y = (grabPos.y - halfPosW) * _ProjectionParams.x * scale + halfPosW; + #if SHADER_API_D3D9 || SHADER_API_D3D11 + grabPos.w += 0.00000000001; + #endif + return(grabPos / grabPos.w).xy; + } + + void applyGrabEffects(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, inout PoiLight poiLight) + { + float2 projectedGrabPos = calculateGrabPosition(poiCam); + calculateRefraction(projectedGrabPos, poiFragData, poiCam, poiMesh, poiLight); + } + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + if (_EnableGrabpass) + { + applyGrabEffects(poiFragData, poiCam, poiMesh, poiLight); + poiFragData.alpha = 1; + } + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ShadowCaster" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask Off + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature CHROMATIC_ABERRATION_LOW + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_instancing + #pragma multi_compile_shadowcaster + #pragma multi_compile_fog + #define POI_PASS_SHADOW + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + #ifdef GRAIN + clip(-1); + return 0; + #endif + + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + poiFragData.finalColor = poiFragData.baseColor; + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + } + CustomEditor "Thry.ShaderEditor" +} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader.meta new file mode 100644 index 00000000..1c83bdea --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Grab Pass.shader.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 2260509a8003e9b4bafc112ed2fb6cf9 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + nonModifiableTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader new file mode 100644 index 00000000..2a65b874 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader @@ -0,0 +1,25935 @@ +Shader ".poiyomi/V8.0/Pro Outline" +{ + Properties + { + [HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 + [HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 + [HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 + [HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 + [HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + + // Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + + // Main + [HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 + //Main-main + _Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 + _MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + _Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + + [HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness ("Brightness", Range(-1, 1)) = 0 + [ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 + _MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + _MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + [ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 + [ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 + _AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 + _AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 + [Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 + _AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 + _AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 + _AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + _AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 + _AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 + _AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + _AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + [ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) + _CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + + [Space(4)] + [ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 + _DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } + [HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + + [HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + + [Space(10)] + [ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + _VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + _VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + [ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + + // Back Face Textures and Emission + [HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 + [HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 + _BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _BackFaceAlpha ("Alpha", Range(0,1)) = 1 + _BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + [ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 + _BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 + _BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + + // RGBA Masking + [HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + [RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 + _RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 + _GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 + _GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 + _BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 + _BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 + _AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 + _AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + + // RGB MASKED NORMALS + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 + _RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + + // Decal Texture + [HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 + [RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 + // Decal 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 + _DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + _Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 0 Audio Link + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + // Decal 1 + //"GEOM_TYPE_FROND" + //"DEPTH_OF_FIELD_COC_VIEW" + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 + _DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + _Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 1 Audio Link + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + // Decal 2 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 + _DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + _Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 2 Audio Link + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + // Decal 3 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 + _DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + _Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 3 Audio Link + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 + _AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) + _AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) + [ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + + [HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 + _GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) + _GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) + _GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) + _GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) + [HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + + // Lighting + [HideInInspector] m_lightingCategory ("Shading", Float) = 0 + + [HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 + // Lighting Data + _LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 + [HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 + [HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 + [HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 + // Base Pass + [Space(15)] + [ThryHeaderLabel(Base Pass Lighting, 13)] + [Space(4)] + [Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 + [Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 + [Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 + [Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) + [ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 + _LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 + _Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 + [ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 + _LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 + _LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 + _LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 + _LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 + _LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 + _LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + // Lighting Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Lighting, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 + [ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 + _LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 + _LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + _LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 + // Vertex Lighting + [Space(15)] + [ThryHeaderLabel(Vertex Lighting, 13)] + [Space(4)] + [ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 + // Lighting Data Debug + [Space(15)] + [ThryHeaderLabel(Debug Visualization, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 + [ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + + [HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + + [HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 + [ThryHeaderLabel(Base Pass Shading, 13)] + [Space(4)] + [KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 + _LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } + _ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 + _LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 + _LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + + // Shade Maps + _1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + [Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 + //DJ Wrapped + _LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + // Realistic + _LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 + // Skin Shading + _SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } + _SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) + // Cloth + [NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } + [ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } + [HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 + [ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 + [Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0 + _ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35, 1)) = 0.5 + _ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0.5 + + // Generic + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=4)}", Range(0, 1)) = 1 + _LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + + // Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Shading, 13)] + [Space(4)] + [Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + //_LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 //TODO-implement this + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + + [HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + + // First Matcap + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 + [HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 + _MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + _MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + + // Second Matcap + [HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 + _Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + _Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + + // First CubeMap + [HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 + [HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 + [ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 + _CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } + _CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 + _CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 + _CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 + _CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 + _CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 + _CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 + _CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + + // Rim Lighting + [HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 + [HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 + _RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 + _RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + + [HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + + _MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 + _MochieSpecularStrength ("Specular", Range(0, 1)) = 1 + _MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 + _MochieRoughnessMultiplier ("Smoothness", Range(0, 1)) = 1 + + _MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 + _MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 + [Space(8)] + + [RGBAAtlas(Metallic Map, Smoothness Map, Reflection Mask, Specular Mask)]_MochieMetallicMaps ("Maps [Expand]--{reference_properties:[_MochieMetallicMapsPan, _MochieMetallicMapsUV, _MochieMetallicMapInvert, _MochieRoughnessMapInvert, _MochieReflectionMaskInvert, _MochieSpecularMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieMetallicMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapsUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert Metallic", Float) = 0 + [HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert Reflection Mask", Float) = 0 + [HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert Specular Mask", Float) = 0 + [Space(8)] + + [ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } + [ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 + [ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + + [HideInInspector] m_end_brdf ("", Float) = 0 + + [HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 + [HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + _ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + + _ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + + [NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + + [ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + + _ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 + _ClearCoat ("Clear Coat", Range(0, 1)) = 1 + _ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 + [ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 + [ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + + [HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 + [HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 + _RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("", Float) = 0 + + [HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 + [HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + + [ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 + _HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 + _Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } + [HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 + [HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 + [ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 + [ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + + _StylizedSpecularStrength ("Strength", Float) = 1 + [ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 1, 13)] + _HighColor_Power ("Size", Range(0, 1)) = 0.2 + _StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 + _Layer1Strength ("Strength", Range(0, 1)) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 2, 13)] + _Layer2Size ("Size", Range(0, 1)) = 0 + _StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 + _Layer2Strength ("Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_stylizedSpec ("", Float) = 0 + + // Outlines + [HideInInspector] m_OutlineCategory (" Outlines--{reference_property:_EnableOutlines}", Float) = 0 + // Outline Vertex + [HideInInspector][ToggleUI]_EnableOutlines ("Enable Outlines", float) = 0 + [Enum(Basic, 0, Tint, 1, Rim Light, 2, Directional, 3, DropShadow, 4)]_OutlineMode ("Mode", Int) = 0 + _OutlineTintMix ("Tint Mix--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==1}}", Range(0, 1)) = 0 + _OutlineRimLightBlend ("Rim Light Blend--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==2}}", Range(0, 1)) = 0 + _OutlinePersonaDirection ("directional Offset XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==3}}", Vector) = (1, 0, 0, 0) + _OutlineDropShadowOffset ("Drop Direction XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==4}}", Vector) = (1, 0, 0, 0) + [ToggleUI]_OutlineFixedSize ("Fixed Size?", Float) = 0 + _OutlinesMaxDistance ("Fixed Size Max Distance", Float) = 9999 + [Enum(Off, 0, Normals, 1, Mask VC.r, 2)]_OutlineUseVertexColors ("Vertex Color", Float) = 0 + [ToggleUI]_OutlineLit ("Enable Lighting", Float) = 1 + _LineWidth ("Width", Float) = 0 + _LineColor ("Color--{reference_property:_LineColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LineColorThemeIndex ("", Int) = 0 + _OutlineEmission ("Outline Emission", Float) = 0 + _OutlineTexture ("Outline Texture--{reference_properties:[_OutlineTexturePan, _OutlineTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineTexturePan ("Outline Texture Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _OutlineTextureUV ("UV", Int) = 0 + _OutlineMask ("Outline Mask--{reference_properties:[_OutlineMaskPan, _OutlineMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _OutlineMaskUV ("UV", Int) = 0 + _OutlineShadowStrength ("Shadow Strength", Range(0, 1)) = 1 + [Header(Hue Shift)] + [ToggleUI]_OutlineHueShift ("Hue Shift?", Float) = 0 + _OutlineHueOffset ("Shift", Range(0, 1)) = 0 + _OutlineHueOffsetSpeed ("Shift Speed", Float) = 0 + [HideInInspector] m_start_outlineAdvanced ("Advanced", Float) = 0 + _Offset_Z ("Cam Z Offset", Float) = 0 + [Vector2]_OutlineFadeDistance ("Outline distance Fade", Vector) = (0, 0, 0, 0) + [Enum(UnityEngine.Rendering.CullMode)] _OutlineCull ("Cull", Float) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Float) = 4 + _OutlineOffsetFactor ("Offset Factor", Float) = 0 + _OutlineOffsetUnits ("Offset Units", Float) = 0 + [HideInInspector] m_end_outlineAdvanced ("Advanced", Float) = 0 + + // Rendering Options + [HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 + // SPECIALFX_PROPERTIES + + // UDIM Discard + [HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 + [Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) + [HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + + // Dissolve + [HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 + [HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 + _DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + + // Point to Point Dissolve + [HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + + [HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + + // Locked in anim sldiers + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + // Flipbook + [HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 + _FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 + _FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + _FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + + //Flipbook audio link + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 + _FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + + // Flipbook Manual Control + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + //TODO Add inverts to the masks + //Emission 1 + [HideInInspector] m_start_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 + [HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + _EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + + // Center out emission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + + // Glow in the dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + + // Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 + _EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + + // Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + _EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 + _EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emissionOptions ("", Float) = 0 + + // Second Emission + [HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + _EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + + // Second Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + + // Second Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + + // Second Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 + _EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + + // Second Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + _EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 + _EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission1Options ("", Float) = 0 + + // Third Emission + [HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 + _EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 + _EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 + _EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + + // Third Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + + // Third Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 + _GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + + // Third Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 + _EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + _EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 + _EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 + _EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + + // Third Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + [Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + _EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission2Options ("", Float) = 0 + + // Fourth Emission + [HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 + [ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 + _EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 + _EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 + _EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + + // Fourth Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + + // Fourth Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 + _GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + + // Fourth Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 + _EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + _EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 + _EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 + _EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + + // Fourth Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + [Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + _EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission3Options ("", Float) = 0 + [HideInInspector] m_end_emissions ("Emissions", Float) = 0 + + // Glitter + [HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 + [Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 + _GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 + _GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 + [HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 + [ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) + _PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 + [HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 + [HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 + [HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 + [Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) + [Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) + [Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + + [Header(Timing Options)] + [Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) + [Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + + [HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + // Time Offsets + [Header(Time Offset)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + + [Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) + [HideInInspector] m_end_PathAudioLink ("", Float) = 0 + [HideInInspector] m_end_pathing ("", Float) = 0 + + // Mirror Rendering + [HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 + _MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + + [HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 + _DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 + [ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 + _DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 + _DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 + _DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 + _DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 + _DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 + _DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + + [Space(10)] + [ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 + _DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 + _DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 + _DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 + _DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 + [HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + + // Iridescence Audio Link + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + + // MSDF OVERLAY + [HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + + // FPS + [HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + + // POSITION + [HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 + //[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 + _TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + + // INSTANCE TIME + [HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + + // Poi Extras + // Audio link + [HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 + [HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 + [ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 + /* + _AudioLinkDelay ("Delay", Range(0, 1)) = 0 + [ToggleUI]_AudioLinkCCStripY("CC Strip Y UV", Float) = 0 + */ + //[ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 + //_AudioLinkAverageRange ("Average Sampling Range", Range(0, 1)) = .5 + [ThryHeaderLabel(Debug Visualizer, 13)] + [ToggleUI]_DebugWaveform("Waveform", Float) = 0 + [ToggleUI]_DebugDFT("DFT", Float) = 0 + [ToggleUI]_DebugBass("Bass", Float) = 0 + [ToggleUI]_DebugLowMids("Low Mids", Float) = 0 + [ToggleUI]_DebugHighMids("High Mids", Float) = 0 + [ToggleUI]_DebugTreble("Treble", Float) = 0 + [ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 + [ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 + [ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 + [ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 + [ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 + [Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + + [HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 + [HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 + [HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + + [ThryHeaderLabel(Transform, 13)] + [Space(4)] + [Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 + [Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) + _ALUVScale ("Scale", Vector) = (1, 1, 1, 1) + _ALUVRotation ("Rotation", Range(0, 360)) = 0 + _ALUVRotationSpeed ("Rotation Speed", Float) = 0 + _ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 + _ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + + [Space][ThryHeaderLabel(Volume, 13)] + [Space(4)] + _ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 + _ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 + _ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryHeaderLabel(Band, 13)] + [Space(4)] + _ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 + _ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 + _ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 + _ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + _ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + + [Space][ThryHeaderLabel(Audio Mods, 13)] + [Space(4)] + _ALDecalVolume ("Volume", Int) = 0.5 + _ALDecalBaseBoost ("Bass Boost", Float) = 5.0 + _ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + + [Space][ThryHeaderLabel(Colors and Blending, 13)] + [Space(4)] + [Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 + _ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) + _ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) + _ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) + _ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 + _ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 + _ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + + [HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + + // Rendering Options + [HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 + [HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 + [HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 + _DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 + _DistortionStrength ("Strength1", Float) = 0.03 + _DistortionStrength1 ("Strength2", Float) = 0.01 + [HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + + [HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 + [ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 + [ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 + [HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + + [HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 + [Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) + _PolarRadialScale ("Radial Scale", Float) = 1 + _PolarLengthScale ("Length Scale", Float) = 1 + _PolarSpiralPower ("Spiral Power", Float) = 0 + [HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 + + [HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 + [HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + + [ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + + /* + [ThryTexture]_Heightmask ("Mask--{reference_properties:[_HeightmaskPan, _HeightmaskUV, _HeightmaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightmaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_HeightmaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightmaskUV ("UV", Int) = 0 + */ + + _HeightStrength ("Strength", Range(0, 1)) = 0.4247461 + //_HeightOffset ("Offset", Range(-1, 1)) = 0 + _CurvatureU ("Curvature U", Range(0, 100)) = 0 + _CurvatureV ("Curvature V", Range(0, 30)) = 0 + [IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 + [IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 + _CurvFix ("Curvature Bias", Range(0, 1)) = 1 + // [ThryToggle]_ParallaxUV0 ("UV0", Float) = 0 + // [ThryToggle]_ParallaxUV1 ("UV1", Float) = 0 + // [ThryToggle]_ParallaxUV2 ("UV2", Float) = 0 + // [ThryToggle]_ParallaxUV3 ("UV3", Float) = 0 + // [ThryToggle]_ParallaxPano ("Panosphere", Float) = 0 + // [ThryToggle]_ParallaxWorldPos ("World Pos", Float) = 0 + // [ThryToggle]_ParallaxPolar ("Polar", Float) = 0 + // [ThryToggle]_ParallaxDist ("Distorted UV", Float) = 0 + + [HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + + // Rendering Options + [HideInInspector] m_postprocessing ("Post Processing", Float) = 0 + [HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 + [Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 + _PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 + _PPLightingAddition ("Lighting Add", Float) = 0 + _PPEmissionMultiplier ("Emission Multiplier", Float) = 1 + _PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 + [HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + + [HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 + [ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + + [NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} + _PPLUTStrength("LUT Strength", Range(0,1)) = 0 + _PPHue("Hue", Range(0,1)) = 0 + [HDR]_PPTint("Tint", Color) = (1,1,1,1) + [Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) + _PPContrast("Contrast", Float) = 1 + _PPSaturation("Saturation", Float) = 1 + _PPBrightness("Brightness", Float) = 1 + _PPLightness("Lightness", Float) = 0 + _PPHDR("HDR", Float) = 0 + + [HideInInspector] m_end_postprocess ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_renderingCategory ("Rendering", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + + // Blending Options + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + + // Stencils + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + + // Outline Stencil + [HideInInspector] m_start_OutlineStencil ("Outline Stencil", Float) = 0 + [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.StencilOp)] _OutlineStencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_OutlineStencil ("Outline Stencil", Float) = 0 + + } + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_BASE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _EMISSION + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap; + #endif + float4 _EmissionMap_ST; + float2 _EmissionMapPan; + float _EmissionMapUV; + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask; + #endif + float4 _EmissionMask_ST; + float2 _EmissionMaskPan; + float _EmissionMaskUV; + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve; + #endif + float4 _EmissionScrollingCurve_ST; + + float4 _EmissionColor; + float _EmissionBaseColorAsMap; + float _EmissionStrength; + float _EmissionHueShiftEnabled; + float _EmissionHueShift; + float _EmissionHueShiftSpeed; + float _EmissionCenterOutEnabled; + float _EmissionCenterOutSpeed; + float _EnableGITDEmission; + float _GITDEWorldOrMesh; + float _GITDEMinEmissionMultiplier; + float _GITDEMaxEmissionMultiplier; + float _GITDEMinLight; + float _GITDEMaxLight; + float _EmissionBlinkingEnabled; + float _EmissiveBlink_Min; + float _EmissiveBlink_Max; + float _EmissiveBlink_Velocity; + float _EmissionBlinkingOffset; + float _ScrollingEmission; + float4 _EmissiveScroll_Direction; + float _EmissiveScroll_Width; + float _EmissiveScroll_Velocity; + float _EmissiveScroll_Interval; + float _EmissionScrollingOffset; + + float _EmissionReplace0; + float _EmissionScrollingVertexColor; + float _EmissionScrollingUseCurve; + float _EmissionColorThemeIndex; + + // Audio Link + float _EmissionAL0Enabled; + float2 _EmissionAL0StrengthMod; + float _EmissionAL0StrengthBand; + float2 _AudioLinkEmission0CenterOut; + float _AudioLinkEmission0CenterOutwidth; + float _AudioLinkEmission0CenterOutSize; + float _AudioLinkEmission0CenterOutBand; + #endif + + #ifdef POI_EMISSION_1 + + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap1; + #endif + float4 _EmissionMap1_ST; + float2 _EmissionMap1Pan; + float _EmissionMap1UV; + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask1; + #endif + float4 _EmissionMask1_ST; + float2 _EmissionMask1Pan; + float _EmissionMask1UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve1; + #endif + float4 _EmissionScrollingCurve1_ST; + + float4 _EmissionColor1; + float _EmissionBaseColorAsMap1; + float _EmissionStrength1; + float _EnableEmission1; + float _EmissionHueShift1; + float _EmissionHueShiftSpeed1; + float4 _EmissiveScroll_Direction1; + float _EmissiveScroll_Width1; + float _EmissiveScroll_Velocity1; + float _EmissiveScroll_Interval1; + float _EmissionBlinkingEnabled1; + float _EmissiveBlink_Min1; + float _EmissiveBlink_Max1; + float _EmissiveBlink_Velocity1; + float _ScrollingEmission1; + float _EnableGITDEmission1; + float _GITDEMinEmissionMultiplier1; + float _GITDEMaxEmissionMultiplier1; + float _GITDEMinLight1; + float _GITDEMaxLight1; + float _GITDEWorldOrMesh1; + float _EmissionCenterOutEnabled1; + float _EmissionCenterOutSpeed1; + float _EmissionHueShiftEnabled1; + float _EmissionBlinkingOffset1; + float _EmissionScrollingOffset1; + float _EmissionScrollingVertexColor1; + float _EmissionScrollingUseCurve1; + float _EmissionReplace1; + float _EmissionColor1ThemeIndex; + + // Audio Link + float _EmissionAL1Enabled; + float2 _EmissionAL1StrengthMod; + float _EmissionAL1StrengthBand; + float2 _AudioLinkEmission1CenterOut; + float _AudioLinkEmission1CenterOutwidth; + float _AudioLinkEmission1CenterOutSize; + float _AudioLinkEmission1CenterOutBand; + #endif + + #ifdef POI_EMISSION_2 + + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap2; + #endif + float4 _EmissionMap2_ST; + float2 _EmissionMap2Pan; + float _EmissionMap2UV; + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask2; + #endif + float4 _EmissionMask2_ST; + float2 _EmissionMask2Pan; + float _EmissionMask2UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve2; + #endif + float4 _EmissionScrollingCurve2_ST; + + float4 _EmissionColor2; + float _EmissionBaseColorAsMap2; + float _EmissionStrength2; + float _EnableEmission2; + float _EmissionHueShift2; + float _EmissionHueShiftSpeed2; + float4 _EmissiveScroll_Direction2; + float _EmissiveScroll_Width2; + float _EmissiveScroll_Velocity2; + float _EmissiveScroll_Interval2; + float _EmissionBlinkingEnabled2; + float _EmissiveBlink_Min2; + float _EmissiveBlink_Max2; + float _EmissiveBlink_Velocity2; + float _ScrollingEmission2; + float _EnableGITDEmission2; + float _GITDEMinEmissionMultiplier2; + float _GITDEMaxEmissionMultiplier2; + float _GITDEMinLight2; + float _GITDEMaxLight2; + float _GITDEWorldOrMesh2; + float _EmissionCenterOutEnabled2; + float _EmissionCenterOutSpeed2; + float _EmissionHueShiftEnabled2; + float _EmissionBlinkingOffset2; + float _EmissionScrollingOffset2; + float _EmissionScrollingVertexColor2; + float _EmissionScrollingUseCurve2; + float _EmissionReplace2; + float _EmissionColor2ThemeIndex; + + // Audio Link + float _EmissionAL2Enabled; + float2 _EmissionAL2StrengthMod; + float _EmissionAL2StrengthBand; + float2 _AudioLinkEmission2CenterOut; + float _AudioLinkEmission2CenterOutwidth; + float _AudioLinkEmission2CenterOutSize; + float _AudioLinkEmission2CenterOutBand; + #endif + + #ifdef POI_EMISSION_3 + + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap3; + #endif + float4 _EmissionMap3_ST; + float2 _EmissionMap3Pan; + float _EmissionMap3UV; + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask3; + #endif + float4 _EmissionMask3_ST; + float2 _EmissionMask3Pan; + float _EmissionMask3UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve3; + #endif + float4 _EmissionScrollingCurve3_ST; + + float4 _EmissionColor3; + float _EmissionBaseColorAsMap3; + float _EmissionStrength3; + float _EnableEmission3; + float _EmissionHueShift3; + float _EmissionHueShiftSpeed3; + float4 _EmissiveScroll_Direction3; + float _EmissiveScroll_Width3; + float _EmissiveScroll_Velocity3; + float _EmissiveScroll_Interval3; + float _EmissionBlinkingEnabled3; + float _EmissiveBlink_Min3; + float _EmissiveBlink_Max3; + float _EmissiveBlink_Velocity3; + float _ScrollingEmission3; + float _EnableGITDEmission3; + float _GITDEMinEmissionMultiplier3; + float _GITDEMaxEmissionMultiplier3; + float _GITDEMinLight3; + float _GITDEMaxLight3; + float _GITDEWorldOrMesh3; + float _EmissionCenterOutEnabled3; + float _EmissionCenterOutSpeed3; + float _EmissionHueShiftEnabled3; + float _EmissionBlinkingOffset3; + float _EmissionScrollingOffset3; + float _EmissionScrollingVertexColor3; + float _EmissionScrollingUseCurve3; + float _EmissionReplace3; + float _EmissionColor3ThemeIndex; + + // Audio Link + float _EmissionAL3Enabled; + float2 _EmissionAL3StrengthMod; + float _EmissionAL3StrengthBand; + float2 _AudioLinkEmission3CenterOut; + float _AudioLinkEmission3CenterOutwidth; + float _AudioLinkEmission3CenterOutSize; + float _AudioLinkEmission3CenterOutBand; + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) + { + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; + } + + float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) + { + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; + } + + float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) + { + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; + } + + void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionStrengthMod.x, emissionStrengthMod.y, poiMods.audioLink[emissionStrengthBand]); + } + #endif + } + + void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionToAdd.x, emissionToAdd.y, getBandAtTime(band, saturate(1 - nDotV), width, size)); + } + #endif + } + + #ifdef _EMISSION + float3 applyEmission(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // First Emission + float3 emission0 = 0; + float emissionStrength0 = _EmissionStrength; + float3 emissionColor0 = 0; + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(_GITDEMinLight, _GITDEMaxLight, _GITDEMinEmissionMultiplier, _GITDEMaxEmissionMultiplier, _EnableGITDEmission, _GITDEWorldOrMesh, poiLight); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionMap_ST), _EmissionMapPan).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap_ST.xy) + _Time.x * _EmissionCenterOutSpeed).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + #else + emissionColor0 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + #endif + + //UNITY_BRANCH + if (_ScrollingEmission) + { + float3 pos = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor) + { + pos = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionScrollingCurve_ST) + (dot(pos, _EmissiveScroll_Direction.xyz) * _EmissiveScroll_Interval) + _Time.x * _EmissiveScroll_Velocity).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(_EmissiveScroll_Direction.xyz, _EmissiveScroll_Velocity, _EmissiveScroll_Interval, _EmissiveScroll_Width, _EmissionScrollingOffset, pos); + } + } + + //UNITY_BRANCH + if (_EmissionBlinkingEnabled) + { + emissionStrength0 *= calculateBlinkingEmission(_EmissiveBlink_Min, _EmissiveBlink_Max, _EmissiveBlink_Velocity, _EmissionBlinkingOffset); + } + + emissionColor0 = hueShift(emissionColor0, frac(_EmissionHueShift + _EmissionHueShiftSpeed * _Time.x) * _EmissionHueShiftEnabled); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, poiUV(poiMesh.uv[_EmissionMaskUV], _EmissionMask_ST) + _Time.x * _EmissionMaskPan).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission != 4) + { + emissionMask0 *= blackLightMask[_BlackLightMaskEmission]; + } + #endif + + applyALEmmissionStrength(poiMods, emissionStrength0, _EmissionAL0StrengthMod, _EmissionAL0StrengthBand, _EmissionAL0Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength0, _AudioLinkEmission0CenterOutwidth, _AudioLinkEmission0CenterOutSize, _AudioLinkEmission0CenterOutBand, _AudioLinkEmission0CenterOut, _EmissionAL0Enabled); + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = max(emissionStrength0 * emissionColor0, 0); + + #ifdef POI_DISSOLVE + //UNITY_BRANCH + if (_DissolveEmissionSide != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, _DissolveEmissionSide); + } + #endif + + // poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emission0 + emission1), _EmissionReplace * poiMax(emission0 + emission1)); + + poiFragData.emission += emission0; + return emission0 * _EmissionReplace0; + } + #endif + + #ifdef POI_EMISSION_1 + float3 applyEmission1(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + emissionStrength1 = _EmissionStrength1; + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(_GITDEMinLight1, _GITDEMaxLight1, _GITDEMinEmissionMultiplier1, _GITDEMaxEmissionMultiplier1, _EnableGITDEmission1, _GITDEWorldOrMesh1, poiLight); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled1) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionMap1_ST), _EmissionMap1Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap1_ST.xy) + _Time.x * _EmissionCenterOutSpeed1).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + #else + emissionColor1 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission1) + { + float3 pos1 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor1) + { + pos1 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve1) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionScrollingCurve1_ST) + (dot(pos1, _EmissiveScroll_Direction1) * _EmissiveScroll_Interval1) + _Time.x * _EmissiveScroll_Velocity1); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(_EmissiveScroll_Direction1, _EmissiveScroll_Velocity1, _EmissiveScroll_Interval1, _EmissiveScroll_Width1, _EmissionScrollingOffset1, pos1); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled1) + { + emissionStrength1 *= calculateBlinkingEmission(_EmissiveBlink_Min1, _EmissiveBlink_Max1, _EmissiveBlink_Velocity1, _EmissionBlinkingOffset1); + } + + emissionColor1 = hueShift(emissionColor1, frac(_EmissionHueShift1 + _EmissionHueShiftSpeed1 * _Time.x) * _EmissionHueShiftEnabled1); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, poiUV(poiMesh.uv[_EmissionMask1UV], _EmissionMask1_ST) + _Time.x * _EmissionMask1Pan); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission2 != 4) + { + emissionMask1 *= blackLightMask[_BlackLightMaskEmission2]; + } + #endif + applyALEmmissionStrength(poiMods, emissionStrength1, _EmissionAL1StrengthMod, _EmissionAL1StrengthBand, _EmissionAL1Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength1, _AudioLinkEmission1CenterOutwidth, _AudioLinkEmission1CenterOutSize, _AudioLinkEmission1CenterOutBand, _AudioLinkEmission1CenterOut, _EmissionAL1Enabled); + + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = max(emissionStrength1 * emissionColor1, 0); + + poiFragData.emission += emission1; + return emission1 * _EmissionReplace1; + } + #endif + + #ifdef POI_EMISSION_2 + float3 applyEmission2(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission2 = 0; + float emissionStrength2 = 0; + float3 emissionColor2 = 0; + + emissionStrength2 = _EmissionStrength2; + + float glowInTheDarkMultiplier2 = calculateGlowInTheDark(_GITDEMinLight2, _GITDEMaxLight2, _GITDEMinEmissionMultiplier2, _GITDEMaxEmissionMultiplier2, _EnableGITDEmission2, _GITDEWorldOrMesh2, poiLight); + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled2) + { + emissionColor2 = POI2D_SAMPLER_PAN(_EmissionMap2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionMap2_ST), _EmissionMap2Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + else + { + emissionColor2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap2, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap2_ST.xy) + _Time.x * _EmissionCenterOutSpeed2).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + #else + emissionColor2 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission2) + { + float3 pos2 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor2) + { + pos2 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve2) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + emissionStrength2 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionScrollingCurve2_ST) + (dot(pos2, _EmissiveScroll_Direction2) * _EmissiveScroll_Interval2) + _Time.x * _EmissiveScroll_Velocity2); + #endif + } + else + { + emissionStrength2 *= calculateScrollingEmission(_EmissiveScroll_Direction2, _EmissiveScroll_Velocity2, _EmissiveScroll_Interval2, _EmissiveScroll_Width2, _EmissionScrollingOffset2, pos2); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled2) + { + emissionStrength2 *= calculateBlinkingEmission(_EmissiveBlink_Min2, _EmissiveBlink_Max2, _EmissiveBlink_Velocity2, _EmissionBlinkingOffset2); + } + + emissionColor2 = hueShift(emissionColor2, frac(_EmissionHueShift2 + _EmissionHueShiftSpeed2 * _Time.x) * _EmissionHueShiftEnabled2); + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + float emissionMask2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask2, _MainTex, poiUV(poiMesh.uv[_EmissionMask2UV], _EmissionMask2_ST) + _Time.x * _EmissionMask2Pan); + #else + float emissionMask2 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask2 *= blackLightMask[_BlackLightMaskEmission2]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength2, _EmissionAL2StrengthMod, _EmissionAL2StrengthBand, _EmissionAL2Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength2, _AudioLinkEmission2CenterOutwidth, _AudioLinkEmission2CenterOutSize, _AudioLinkEmission2CenterOutBand, _AudioLinkEmission2CenterOut, _EmissionAL2Enabled); + emissionStrength2 *= glowInTheDarkMultiplier2 * emissionMask2; + emission2 = max(emissionStrength2 * emissionColor2, 0); + + poiFragData.emission += emission2; + return emission2 * _EmissionReplace2; + } + #endif + + #ifdef POI_EMISSION_3 + float3 applyEmission3(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission3 = 0; + float emissionStrength3 = 0; + float3 emissionColor3 = 0; + + emissionStrength3 = _EmissionStrength3; + + float glowInTheDarkMultiplier3 = calculateGlowInTheDark(_GITDEMinLight3, _GITDEMaxLight3, _GITDEMinEmissionMultiplier3, _GITDEMaxEmissionMultiplier3, _EnableGITDEmission3, _GITDEWorldOrMesh3, poiLight); + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled3) + { + emissionColor3 = POI2D_SAMPLER_PAN(_EmissionMap3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionMap3_ST), _EmissionMap3Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + else + { + emissionColor3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap3, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap3_ST.xy) + _Time.x * _EmissionCenterOutSpeed3).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + #else + emissionColor3 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission3) + { + float3 pos3 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor3) + { + pos3 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve3) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + emissionStrength3 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionScrollingCurve3_ST) + (dot(pos3, _EmissiveScroll_Direction3) * _EmissiveScroll_Interval3) + _Time.x * _EmissiveScroll_Velocity3); + #endif + } + else + { + emissionStrength3 *= calculateScrollingEmission(_EmissiveScroll_Direction3, _EmissiveScroll_Velocity3, _EmissiveScroll_Interval3, _EmissiveScroll_Width3, _EmissionScrollingOffset3, pos3); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled3) + { + emissionStrength3 *= calculateBlinkingEmission(_EmissiveBlink_Min3, _EmissiveBlink_Max3, _EmissiveBlink_Velocity3, _EmissionBlinkingOffset3); + } + + emissionColor3 = hueShift(emissionColor3, frac(_EmissionHueShift3 + _EmissionHueShiftSpeed3 * _Time.x) * _EmissionHueShiftEnabled3); + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + float emissionMask3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask3, _MainTex, poiUV(poiMesh.uv[_EmissionMask3UV], _EmissionMask3_ST) + _Time.x * _EmissionMask3Pan); + #else + float emissionMask3 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask3 *= blackLightMask[_BlackLightMaskEmission3]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength3, _EmissionAL3StrengthMod, _EmissionAL3StrengthBand, _EmissionAL3Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength3, _AudioLinkEmission3CenterOutwidth, _AudioLinkEmission3CenterOutSize, _AudioLinkEmission3CenterOutBand, _AudioLinkEmission3CenterOut, _EmissionAL3Enabled); + emissionStrength3 *= glowInTheDarkMultiplier3 * emissionMask3; + emission3 = max(emissionStrength3 * emissionColor3, 0); + + poiFragData.emission += emission3; + return emission3 * _EmissionReplace3; + } + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + /* + #ifdef + , out float depth : SV_DEPTH + #endif + */ + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; + #endif + + #ifdef _EMISSION + emissionBaseReplace += applyEmission(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_1 + emissionBaseReplace += applyEmission1(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_2 + emissionBaseReplace += applyEmission2(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_3 + emissionBaseReplace += applyEmission3(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); + #endif + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha; + + ApplyAlphaToCoverage(poiFragData, poiMesh); + + applyDithering(poiFragData, poiCam); + + #ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * _PPEmissionMultiplier, 0); + poiFragData.finalColor = max(poiFragData.finalColor * _PPFinalColorMultiplier, 0); + #endif + + #ifdef MOCHIE_POSTPROCESS + applyPostProcessing(poiFragData, poiMesh); + #endif + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilCompareFunction] + Pass [_OutlineStencilPassOp] + Fail [_OutlineStencilFailOp] + ZFail [_OutlineStencilZFailOp] + } + + /* + ColorMask [_ColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + ZWrite [_ZWrite] + AlphaToMask [_AlphaToCoverage] + Cull [_OutlineCull] + */ + ZTest [_OutlineZTest] + Cull [_OutlineCull] + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_OUTLINE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_PASS_OUTLINE + // outline Vertex Options + float _OutlineMode; + float4 _OutlinePersonaDirection; + float4 _OutlineDropShadowOffset; + float _OutlineUseVertexColors; + float _OutlineFixedSize; + float _EnableOutlines; + float _OutlinesMaxDistance; + float _LineWidth; + float _OutlineEmission; + float4 _LineColor; + texture2D _OutlineTexture; //TODO make this dynamically not read for lock in + float4 _OutlineTexture_ST; + float2 _OutlineTexturePan; + float _OutlineTextureUV; + float4 _OutlineFadeDistance; + float4 _OutlineGlobalPan; + sampler2D _OutlineMask; + float4 _OutlineMask_ST; + float2 _OutlineMaskPan; + float _OutlineMaskUV; + float _OutlineRimLightBlend; + float _OutlineLit; + float _OutlineTintMix; + half _OutlineHueOffset; + half _OutlineHueShift; + half _OutlineHueOffsetSpeed; + float _OutlineShadowStrength; + float _LineColorThemeIndex; + float _Offset_Z; + #endif + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_PASS_OUTLINE + void applyOutlineColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + clip(_EnableOutlines - 0.01); + float OutlineMask = tex2D(_OutlineMask, TRANSFORM_TEX(poiMesh.uv[_OutlineMaskUV], _OutlineMask) + _Time.x * _OutlineMaskPan).r; + clip(OutlineMask * _LineWidth - 0.001); + float4 col = POI2D_SAMPLER_PAN(_OutlineTexture, _MainTex, poiUV(poiMesh.uv[_OutlineTextureUV], _OutlineTexture_ST), _OutlineTexturePan) * float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a); + //UNITY_BRANCH + if (_OutlineMode == 0) + { + poiFragData.baseColor = col; + } + //UNITY_BRANCH + if (_OutlineMode == 1) + { + poiFragData.baseColor = lerp(float4(poiThemeColor(poiMods, _LineColor.rgb, _LineColorThemeIndex), _LineColor.a), poiFragData.baseColor, _OutlineTintMix) * col; + } + //UNITY_BRANCH + if (_OutlineMode == 2) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, poiLight.directColor, _OutlineRimLightBlend) * col; + } + + poiFragData.alpha *= col.a; + + // Hue shift + //UNITY_BRANCH + if (_OutlineHueShift) + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, _OutlineHueOffset +_OutlineHueOffsetSpeed * _Time.x); + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_PASS_OUTLINE + applyOutlineColor(poiFragData, poiMesh, poiLight, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardAdd" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite Off + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_instancing + #pragma multi_compile_fog + #define POI_PASS_ADD + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ShadowCaster" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask Off + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_instancing + #pragma multi_compile_shadowcaster + #pragma multi_compile_fog + #define POI_PASS_SHADOW + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + #ifdef POI_PASS_OUTLINE + float outlineMask = 1; + //TODO figure out why uvs can't be set dynamically + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(poiUV(o.uv[0], _OutlineMask_ST) + _Time.x * _OutlineMaskPan, 0, 0)).rgb); + + //UNITY_BRANCH + if (_OutlineUseVertexColors == 2) + { + outlineMask *= v.color.r; + } + + float3 outlineNormal = o.normal; + //UNITY_BRANCH + if (_OutlineUseVertexColors == 1) + { + //TODO normals appear to be transformed before entering the vertex shader and I'm not sure how to achieve the same results with vertex colors + outlineNormal = UnityObjectToWorldNormal(v.color); + } + + half offsetMultiplier = 1; + half distanceOffset = 1; + //UNITY_BRANCH + if (_OutlineFixedSize) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, o.localPos).xyz), _OutlinesMaxDistance); + } + + float3 offset = outlineNormal * (_LineWidth * _EnableOutlines / 100) * outlineMask * distanceOffset; + + //UNITY_BRANCH + if (_OutlineMode == 2) + { + float3 lightDirection = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, outlineNormal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, outlineNormal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(_OutlinePersonaDirection.xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if (_OutlineMode == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), _OutlineDropShadowOffset); + offset *= distanceOffset; + } + + localOffset += mul(unity_WorldToObject, offset); + worldOffset += offset; + #endif + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + #ifdef GRAIN + clip(-1); + return 0; + #endif + + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + #ifdef POI_PASS_OUTLINE + poiMesh.normals[1] = poiMesh.normals[0]; + #endif + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + poiFragData.finalColor = poiFragData.baseColor; + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + } + CustomEditor "Thry.ShaderEditor" +} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader.meta new file mode 100644 index 00000000..0a1b5f59 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro Outline.shader.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 9cdbe9241ea4aaa48944028272700834 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + nonModifiableTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader new file mode 100644 index 00000000..4365771e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader @@ -0,0 +1,21033 @@ +Shader ".poiyomi/V8.0/Pro" +{ + Properties + { + [HideInInspector] shader_master_label ("Poiyomi Pro V8α", Float) = 0 + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] footer_youtube ("{texture:{name:icon-youtube,height:32},action:{type:URL,data:https://www.youtube.com/poiyomi},hover:YOUTUBE}", Float) = 0 + [HideInInspector] footer_twitter ("{texture:{name:icon-twitter,height:32},action:{type:URL,data:https://twitter.com/poiyomi},hover:TWITTER}", Float) = 0 + [HideInInspector] footer_patreon ("{texture:{name:icon-patreon,height:32},action:{type:URL,data:https://www.patreon.com/poiyomi},hover:PATREON}", Float) = 0 + [HideInInspector] footer_discord ("{texture:{name:icon-discord,height:32},action:{type:URL,data:https://discord.gg/Ays52PY},hover:DISCORD}", Float) = 0 + [HideInInspector] footer_github ("{texture:{name:icon-github,height:32},action:{type:URL,data:https://github.com/poiyomi/PoiyomiToonShader},hover:GITHUB}", Float) = 0 + + // Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2450}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3000}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + + // Main + [HideInInspector] m_mainCategory ("Color & Normals", Float) = 0 + //Main-main + _Color ("Color & Alpha--{reference_property:_ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ColorThemeIndex ("", Int) = 0 + _MainTex ("Texture--{reference_properties:[_MainTexPan, _MainTexUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainTexUV ("UV", Int) = 0 + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [Normal]_BumpMap ("Normal Map--{reference_properties:[_BumpMapPan, _BumpMapUV, _BumpScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector]_BumpScale ("Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClippingMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + _Cutoff ("Alpha Cuttoff--{condition_showS:(_Mode==1)}", Range(0, 1.001)) = 0.5 + + [HideInInspector] m_start_MainHueShift ("Color Adjust--{reference_property:_MainColorAdjustToggle}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)] _MainColorAdjustToggle ("Adjust Colors", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(B) B(S)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MainColorAdjustTextureUV ("UV", Int) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness ("Brightness", Range(-1, 1)) = 0 + [ThryToggleUI(true)] _MainHueShiftToggle (" Hue Shift", Float) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 1 + _MainHueShift ("Hue Shift--{condition_showS:(_MainHueShiftToggle==1)}", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_MainHueShiftToggle==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)]_MainHueALCTEnabled (" Hue Shift Audio Link--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)]_MainALHueShiftBand ("Band--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_MainALHueShiftCTIndex ("Motion Type--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Int) = 0 + _MainHueALMotionSpeed ("Motion Speed--{condition_showS:(_MainHueShiftToggle==1 && _EnableAudioLink==1 && _MainHueALCTEnabled==1)}", Float) = 1 + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + [ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaToCoverage (" Alpha To Coverage", Float) = 0 + [ToggleUI]_AlphasharpenedA2C ("sharpened A2C--{condition_showS:(_AlphaToCoverage==1)}", Float) = 0 + _AlphaMipScale ("Mip Level Alpha Scale--{condition_showS:(_AlphaToCoverage==1)}", Range(0, 1)) = 0.25 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDithering (" Dithering", Float) = 0 + _AlphaDitherGradient ("Dither Gradient--{condition_showS:(_AlphaDithering==1)}", Range(0, 1)) = .1 + + [Space(4)] + [ThryToggleUI(true)] _AlphaDistanceFade (" Distance Alpha", Float) = 0 + [Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use--{condition_showS:(_AlphaDistanceFade==1)}", Int) = 1 + _AlphaDistanceFadeMinAlpha ("Min Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 0 + _AlphaDistanceFadeMaxAlpha ("Max Distance Alpha--{condition_showS:(_AlphaDistanceFade==1)}", Range(0, 1)) = 1 + _AlphaDistanceFadeMin ("Min Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + _AlphaDistanceFadeMax ("Max Distance--{condition_showS:(_AlphaDistanceFade==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaFresnel (" Fresnel Alpha", Float) = 0 + _AlphaFresnelAlpha ("Intensity--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = 0 + _AlphaFresnelSharpness ("Sharpness--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + _AlphaFresnelWidth ("Width--{condition_showS:(_AlphaFresnel==1)}", Range(0, 1)) = .5 + [ToggleUI]_AlphaFresnelInvert ("Invert--{condition_showS:(_AlphaFresnel==1)}", Float) = 0 + + [Space(4)] + [ThryToggleUI(true)] _AlphaAngular (" Angular Alpha", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon--{condition_showS:(_AlphaAngular==1)}", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction--{condition_showS:(_AlphaAngular==1)}", Vector) = (0, 0, 1) + _CameraAngleMin ("Camera Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max--{condition_showS:(_AlphaAngular==1)}", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha--{condition_showS:(_AlphaAngular==1)}", Range(0, 1)) = 0 + + [Space(4)] + [ThryToggleUI(true)]_AlphaAudioLinkEnabled (" Alpha Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Vector2]_AlphaAudioLinkAddRange ("Add Range--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AlphaAudioLinkAddBand ("Emission Add Band--{ condition_showS:(_AlphaAudioLinkEnabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)--{reference_properties:[_DetailMaskPan, _DetailMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint--{reference_property:_DetailTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DetailTintThemeIndex ("", Int) = 0 + _DetailTex ("Detail Texture--{reference_properties:[_DetailTexPan, _DetailTexUV]}", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal--{reference_properties:[_DetailNormalMapPan, _DetailNormalMapUV, _DetailNormalMapScale]}", 2D) = "bump" { } + [HideInInspector]_DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + + [HideInInspector] m_start_vertexManipulation ("Vertex Options--{reference_property:_VertexManipulationsEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube}}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotationSpeed ("Local Rotation Speed", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map--{reference_properties:[_VertexManipulationHeightMaskPan, _VertexManipulationHeightMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightMaskUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + + [Space(10)] + [ThryToggleUI(true)]_VertexAudioLinkEnabled (" Audio Link--{condition_showS:(_EnableAudioLink==1)}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalTranslationALBand ("Local Translate Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalTranslationALMin ("Local Translate Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexLocalTranslationALMax ("Local Translate Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandX("Rotation Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandY ("Rotation Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationALBandZ ("Rotation Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationAL ("Rotation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandX ("Band X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeX ("Motion Type X--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandY ("Band Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeY ("Motion Type Y--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalRotationCTALBandZ ("Band Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_VertexLocalRotationCTALTypeZ ("Motion Type Z--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexLocalRotationCTALSpeed ("Rotation Speed--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexLocalScaleALBand ("Scale Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + _VertexLocalScaleALMin ("Scale Min--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + _VertexLocalScaleALMax ("Scale Max--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexWorldTranslationALBand ("World Translation Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector3]_VertexWorldTranslationALMin ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Vector3]_VertexWorldTranslationALMax ("World Translation--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexManipulationHeightBand ("Vertex Height Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexManipulationHeightAL ("Vertex Height--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [Space(10)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _VertexRoundingRangeBand ("Rounding Band--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Int) = 0 + [Vector2]_VertexRoundingRangeAL ("Rounding Range--{ condition_showS:(_EnableAudioLink==1 && _VertexAudioLinkEnabled==1)}", Vector) = (0,0,0) + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + [ToggleUI]_MainVertexColoringLinearSpace ("Linear Colors", Float) = 1 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + + // Back Face Textures and Emission + [HideInInspector] m_start_backFace ("Back Face--{reference_property:_BackFaceEnabled}", Float) = 0 + [HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0 + _BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _BackFaceAlpha ("Alpha", Range(0,1)) = 1 + _BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BackFaceMaskUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + [ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0 + [Space(10)] + [ThryToggleUI(true)]_BackFaceHueShiftEnabled (" Hue Shift", Float) = 0 + _BackFaceHueShift ("Hue Shift--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Range(0, 1)) = 0 + _BackFaceHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_BackFaceHueShiftEnabled==1)}", Float) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + + // RGBA Masking + [HideInInspector] m_start_RGBMask ("RGBA Color Masking--{reference_property:_RGBMaskEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + [RGBAAtlas(R Mask,G Mask,B Mask,A Mask)]_RGBMask ("Mask--{reference_properties:[_RGBMaskPan, _RGBMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color--{reference_property:_RedColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RedColorThemeIndex ("", Int) = 0 + _RedTexure ("R Texture--{reference_properties:[_RedTexurePan, _RedTexureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RedTexurePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RedTexureUV ("UV", int) = 0 + _GreenColor ("G Color--{reference_property:_GreenColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GreenColorThemeIndex ("", Int) = 0 + _GreenTexture ("G Texture--{reference_properties:[_GreenTexturePan, _GreenTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GreenTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_GreenTextureUV ("UV", int) = 0 + _BlueColor ("B Color--{reference_property:_BlueColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BlueColorThemeIndex ("", Int) = 0 + _BlueTexture ("B Texture--{reference_properties:[_BlueTexturePan, _BlueTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_BlueTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_BlueTextureUV ("UV", int) = 0 + _AlphaColor ("A Color--{reference_property:_AlphaColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _AlphaColorThemeIndex ("", Int) = 0 + _AlphaTexture ("A Texture--{reference_properties:[_AlphaTexturePan, _AlphaTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_AlphaTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_AlphaTextureUV ("UV", int) = 0 + + // RGB MASKED NORMALS + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [Normal]_RgbNormalA ("A Normal--{reference_properties:[_RgbNormalAPan, _RgbNormalAUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector][Vector2]_RgbNormalAPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RgbNormalAUV ("UV", int) = 0 + _RgbNormalAScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0, 10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + + // Decal Texture + [HideInInspector] m_start_DecalSection ("Decals--{button_help:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled}", Float) = 0 + [RGBAAtlas(Decal1Mask,Decal2Mask,Decal3Mask,Decal4Mask)]_DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalMaskUV ("UV", Int) = 0 + // Decal 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal0MaskChannel ("Mask Channel", Int) = 0 + _DecalColor ("Color--{reference_property:_DecalColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColorThemeIndex ("", Int) = 0 + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + _Decal0HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 0 Audio Link + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal0Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + // Decal 1 + //"GEOM_TYPE_FROND" + //"DEPTH_OF_FIELD_COC_VIEW" + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal1MaskChannel ("Mask Channel", Int) = 1 + _DecalColor1 ("Color--{reference_property:_DecalColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor1ThemeIndex ("", Int) = 0 + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset1 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha1 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + _Decal1HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 1 Audio Link + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal1Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + // Decal 2 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal2MaskChannel ("Mask Channel", Int) = 2 + _DecalColor2 ("Color--{reference_property:_DecalColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor2ThemeIndex ("", Int) = 0 + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset2 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha2 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + _Decal2HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 2 Audio Link + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal2Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission ("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + // Decal 3 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + [Enum(R, 0, G, 1, B, 2, A, 3)] _Decal3MaskChannel ("Mask Channel", Int) = 3 + _DecalColor3 ("Color--{reference_property:_DecalColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DecalColor3ThemeIndex ("", Int) = 0 + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + _DecalSideOffset3 ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3 ("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalOverideAlpha3 ("Override Alpha", Float) = 0 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + _Decal3HueAngleStrength ("Hue Angle Power", Float) = 0 + // Decal 3 Audio Link + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale ("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3SideBand ("Scale Band", Int) = 0 + _AudioLinkDecal3SideMin ("Side Mod Min", Vector) = (0,0,0,0) + _AudioLinkDecal3SideMax ("Side Mod Max", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3RotationBand ("Rotation Band", Int) = 0 + [Vector2]_AudioLinkDecal3Rotation ("Rotation Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha ("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission ("Emission Mod", Vector) = (0,0,0,0) + [ToggleUI]_AudioLinkDecalX("CC Strip X", Float) = 0 + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + + [HideInInspector] m_start_GlobalThemes ("Global Themes", Float) = 0 + _GlobalThemeColor0 ("Color 0", Color) = (1, 1, 1, 1) + _GlobalThemeColor1 ("Color 1", Color) = (1, 1, 1, 1) + _GlobalThemeColor2 ("Color 2", Color) = (1, 1, 1, 1) + _GlobalThemeColor3 ("Color 3", Color) = (1, 1, 1, 1) + [HideInInspector] m_end_GlobalThemes ("Global Themes", Float) = 0 + + // Lighting + [HideInInspector] m_lightingCategory ("Shading", Float) = 0 + + [HideInInspector] m_start_PoiLightData ("Light Data ", Float) = 0 + // Lighting Data + _LightingAOMaps ("AO Maps (expand)--{reference_properties:[_LightingAOMapsPan, _LightingAOMapsUV,_LightDataAOStrengthR,_LightDataAOStrengthG,_LightDataAOStrengthB,_LightDataAOStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingAOMapsUV ("UV", Int) = 0 + [HideInInspector]_LightDataAOStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightDataAOStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightDataAOStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingDetailShadowMaps ("Detail Shadows (expand)--{reference_properties:[_LightingDetailShadowMapsPan, _LightingDetailShadowMapsUV,_LightingDetailShadowStrengthR,_LightingDetailShadowStrengthG,_LightingDetailShadowStrengthB,_LightingDetailShadowStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingDetailShadowMapsUV ("UV", Int) = 0 + [HideInInspector]_LightingDetailShadowStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingDetailShadowStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingDetailShadowStrengthA ("A Strength", Range(0, 1)) = 0 + _LightingShadowMasks ("Shadow Masks (expand)--{reference_properties:[_LightingShadowMasksPan, _LightingShadowMasksUV,_LightingShadowMaskStrengthR,_LightingShadowMaskStrengthG,_LightingShadowMaskStrengthB,_LightingShadowMaskStrengthA]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMasksPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _LightingShadowMasksUV ("UV", Int) = 0 + [HideInInspector]_LightingShadowMaskStrengthR ("R Strength", Range(0, 1)) = 1 + [HideInInspector]_LightingShadowMaskStrengthG ("G Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthB ("B Strength", Range(0, 1)) = 0 + [HideInInspector]_LightingShadowMaskStrengthA ("A Strength", Range(0, 1)) = 0 + // Base Pass + [Space(15)] + [ThryHeaderLabel(Base Pass Lighting, 13)] + [Space(4)] + [Enum(Poi Custom, 0, Standard, 1, UTS2, 2)] _LightingColorMode ("Light Color Mode", Int) = 0 + [Enum(Poi Custom, 0, Normalized NDotL, 1, Saturated NDotL, 2)] _LightingMapMode ("Light Map Mode", Int) = 0 + [Enum(Poi Custom, 0, Forced Local Direction, 1, Forced World Direction, 2, UTS2, 3)] _LightingDirectionMode ("Light Direction Mode", Int) = 0 + [Vector3]_LightngForcedDirection ("Forced Direction--{condition_showS:(_LightingDirectionMode==1)}", Vector) = (0, 0, 0) + [ToggleUI]_LightingForceColorEnabled ("Force Light Color", Float) = 0 + _LightingForcedColor ("Forced Color--{condition_showS:(_LightingForceColorEnabled==1), reference_property:_LightingForcedColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _LightingForcedColorThemeIndex ("", Int) = 0 + _Unlit_Intensity ("Unlit_Intensity--{condition_showS:(_LightingColorMode==2)}", Range(0.001, 4)) = 1 + [ToggleUI]_LightingCapEnabled ("Limit Brightness", Float) = 1 + _LightingCap ("Max Brightness--{condition_showS:(_LightingCapEnabled==1)}", Range(0, 10)) = 1 + _LightingMinLightBrightness ("Min Direct Brightness", Range(0, 1)) = 0 + _LightingMinLightIndiBrightness ("Min Indirect Brightness", Range(0, 1)) = 0 + _LightingIndirectUsesNormals ("Indirect Uses Normals--{condition_showS:(_LightingColorMode==0)}", Range(0, 1)) = 0 + _LightingCastedShadows ("Receive Casted Shadows", Range(0, 1)) = 0 + _LightingMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + // Lighting Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Lighting, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_ENABLE)]_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [ThryToggle(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE)]_DisableDirectionalInAdd ("Ignore Directional--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 1 + [ToggleUI]_LightingAdditiveLimited ("Limit Brightness?--{condition_showS:(_LightingAdditiveEnable==1)}", Float) = 0 + _LightingAdditiveLimit ("Max Brightness--{ condition_showS:(_LightingAdditiveLimited==1&&_LightingAdditiveEnable==1)}", Range(0, 10)) = 1 + _LightingAdditiveMonochromatic ("Grayscale Lighting?", Range(0, 1)) = 0 + _LightingAdditivePassthrough ("Point Light Passthrough--{condition_showS:(_LightingAdditiveEnable==1)}", Range(0, 1)) = .5 + // Vertex Lighting + [Space(15)] + [ThryHeaderLabel(Vertex Lighting, 13)] + [Space(4)] + [ThryToggle(POI_VERTEXLIGHT_ON)]_LightingVertexLightingEnabled ("Enabled", Float) = 1 + // Lighting Data Debug + [Space(15)] + [ThryHeaderLabel(Debug Visualization, 13)] + [Space(4)] + [ThryToggle(POI_LIGHT_DATA_DEBUG)]_LightDataDebugEnabled ("Debug", Float) = 0 + [ThryWideEnum(Direct Color, 0, Indirect Color, 1, Light Map, 2, Attenuation, 3, N Dot L, 4, Half Dir, 5, Direction, 6, Add Color, 7, Add Attenuation, 8, Add Shadow, 9, Add N Dot L, 10)] _LightingDebugVisualize ("Visualize--{condition_showS:(_LightDataDebugEnabled==1)}", Int) = 0 + + [HideInInspector] m_end_PoiLightData ("Light Data", Float) = 0 + + [HideInInspector] m_start_PoiShading (" Shading--{reference_property:_ShadingEnabled}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_MASKED)]_ShadingEnabled ("Enable Shading", Float) = 1 + [ThryHeaderLabel(Base Pass Shading, 13)] + [Space(4)] + [KeywordEnum(TextureRamp, MathRamp, Wrapped, Skin, ShadeMap, Flat, Realistic, Cloth, )] _LightingMode ("Lighting Type", Float) = 5 + _LightingShadowColor ("Shadow Tint--{condition_showS:(_LightingMode!=4)}", Color) = (1, 1, 1) + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_showS:(_LightingMode==0)}", 2D) = "white" { } + _ShadowOffset ("Ramp Offset--{condition_showS:(_LightingMode==0)}", Range(-1, 1)) = 0 + _LightingGradientStart ("Gradient Start--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_showS:(_LightingMode==1)}", Range(0, 1)) = .5 + _LightingGradientStartWrap ("Gradient Start--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + _LightingGradientEndWrap ("Gradient End--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = .5 + + // Shade Maps + _1st_ShadeColor ("1st ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask ("1st ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse ("1st ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_showS:(_LightingMode==4)}", Color) = (1, 1, 1, 1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_showS:(_LightingMode==4)}", 2D) = "white" { } + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask ("2nd ShadeMap.a As ShadowMask", Float) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse ("2nd ShadeMapMask Inverse", Float) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_showS:(_LightingMode==4)}", Float) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_showS:(_LightingMode==4)}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_showS:(_LightingMode==4)}", Range(0, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_showS:(_LightingMode==4)}", Range(0.0001, 1)) = 0.0001 + [Enum(Replace, 0, Multiply, 1)]_ShadingShadeMapBlendType ("Blend Mode--{condition_showS:(_LightingMode==4)}", Int) = 0 + //DJ Wrapped + _LightingWrappedWrap ("Wrap--{condition_showS:(_LightingMode==2)}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_showS:(_LightingMode==2)}", Range(0, 1)) = 0 + // Realistic + _LightingStandardSmoothness ("Smoothness--{condition_showS:(_LightingMode==6)}", Range(0, 1)) = 0 + // Skin Shading + _SkinLUT ("LUT--{condition_showS:(_LightingMode==3)}", 2D) = "white" { } + _SssScale ("Scale--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_showS:(_LightingMode==3)}", Range(0, 1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_showS:(_LightingMode==3)}", Vector) = (-8, -40, -64, 0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_showS:(_LightingMode==3)}", Vector) = (0.4, 0.15, 0.13, 0) + // Cloth + [NonModifiableTextureData] [NoScaleOffset] _ClothDFG ("MultiScatter Cloth DFG--{condition_showS:(_LightingMode==7)}", 2D) = "black" { } + [ThryTexture] _ClothMetallicSmoothnessMap ("Metallic (R) ClothMask (G) Reflectance (B) Smoothness (A) Map--{reference_properties:[_ClothMetallicSmoothnessMapPan, _ClothMetallicSmoothnessMapUV, _ClothMetallicSmoothnessMapInvert],condition_showS:(_LightingMode==7)}", 2D) = "white" { } + [HideInInspector][Vector2] _ClothMetallicSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI] _ClothMetallicSmoothnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ClothMetallicSmoothnessMapUV ("UV", Int) = 0 + [ThryToggle(POI_CLOTHLERP)] _ClothLerp ("Clothmask Lerp--{condition_showS:(_LightingMode==7)}", Float) = 0 + [Gamma] _ClothMetallic ("Metallic--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0 + _ClothReflectance ("Reflectance--{condition_showS:(_LightingMode==7)}", Range(0.35, 1)) = 0.5 + _ClothSmoothness ("Smoothness--{condition_showS:(_LightingMode==7)}", Range(0, 1)) = 0.5 + + // Generic + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode<=4)}", Range(0, 1)) = 1 + _LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_showS:(_LightingMode<=3)}", Range(0, 1)) = 0 + + // Additive + [Space(15)] + [ThryHeaderLabel(Add Pass Shading, 13)] + [Space(4)] + [Enum(Realistic, 0, Toon, 1, Wrapped soon.jpg, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + //_LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 //TODO-implement this + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 10)) = 1 + + [HideInInspector] m_end_PoiShading ("Shading", Float) = 0 + + // First Matcap + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures--{reference_property:_MatcapEnable}", Float) = 0 + [HideInInspector][ThryToggle(POI_MATCAP0)]_MatcapEnable ("Enable Matcap", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _MatcapUVMode ("UV Mode", Int) = 1 + _MatcapColor ("Color--{reference_property:_MatcapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MatcapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert ("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + _MatcapAlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP0_CUSTOM_NORMAL)]_Matcap0CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap0NormalMap ("Normal Map--{reference_properties:[_Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap0NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap0NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap0NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + + // Second Matcap + [HideInInspector] m_start_Matcap2 ("Matcap 2--{reference_property:_Matcap2Enable}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + [ThryWideEnum(UTS Style, 0, Top Pinch, 1, Double Sided, 2)] _Matcap2UVMode ("UV Mode", Int) = 1 + _Matcap2Color ("Color--{reference_property:_Matcap2ColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _Matcap2ColorThemeIndex ("", Int) = 0 + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert ("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + _Matcap2AlphaOverride ("Override Alpha", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Custom Normal, 13)] + [Space(4)] + [ThryToggle(POI_MATCAP1_CUSTOM_NORMAL)]_Matcap1CustomNormal ("Custom Normal", Float) = 0 + [Normal]_Matcap1NormalMap ("Normal Map--{reference_properties:[_Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale]}", 2D) = "bump" { } + [HideInInspector][Vector2]_Matcap1NormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _Matcap1NormalMapUV ("UV", Int) = 0 + [HideInInspector]_Matcap1NormalMapScale ("Intensity", Range(0, 10)) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + + // First CubeMap + [HideInInspector] m_start_CubeMap ("CubeMap--{reference_property:_CubeMapEnabled}", Float) = 0 + [HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0 + [ThryWideEnum(Skybox, 0, Reflection, 1)] _CubeMapUVMode ("UV Mode", Int) = 1 + _CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0 + [TextureNoSO]_CubeMap ("CubeMap", Cube) = "" { } + _CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _CubeMapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0 + _CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _CubeMapIntensity ("Color Strength", Range(0, 5)) = 1 + _CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _CubeMapReplace ("Replace With CubeMap", Range(0, 1)) = 1 + _CubeMapMultiply ("Multiply CubeMap", Range(0, 1)) = 0 + _CubeMapAdd ("Add CubeMap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1 + + [Space(10)] + [ThryHeaderLabel(Hue Shift, 13)] + [Space(4)] + [ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0 + _CubeMapHueShiftSpeed ("Shift Speed--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Float) = 0 + _CubeMapHueShift ("Hue Shift--{condition_showS:(_CubeMapHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0 + + // Rim Lighting + [HideInInspector] m_start_rimLightOptions ("Rim Lighting--{reference_property:_EnableRimLighting}", Float) = 0 + [HideInInspector][ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color--{reference_property:_RimLightColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _RimLightColorThemeIndex ("", Int) = 0 + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture--{reference_properties:[_RimTexPan, _RimTexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask--{reference_properties:[_RimMaskPan, _RimMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _RimMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)] _RimHueShiftEnabled (" Hue Shift", Float) = 0 + _RimHueShiftSpeed ("Shift Speed--{condition_showS:(_RimHueShiftEnabled==1)}", Float) = 0 + _RimHueShift ("Hue Shift--{condition_showS:(_RimHueShiftEnabled==1)}", Range(0, 1)) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + + [HideInInspector] m_start_brdf ("Reflections & Specular--{reference_property:_MochieBRDF}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_PBR)]_MochieBRDF ("Enable", Float) = 0 + + _MochieReflectionStrength ("Reflections", Range(0, 1)) = 1 + _MochieSpecularStrength ("Specular", Range(0, 1)) = 1 + _MochieMetallicMultiplier ("Metallic", Range(0, 1)) = 0 + _MochieRoughnessMultiplier ("Smoothness", Range(0, 1)) = 1 + + _MochieReflectionTint ("Reflection Tint--{reference_property:_MochieReflectionTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieReflectionTintThemeIndex ("", Int) = 0 + _MochieSpecularTint ("Specular Tint--{reference_property:_MochieSpecularTintThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _MochieSpecularTintThemeIndex ("", Int) = 0 + [Space(8)] + + [RGBAAtlas(Metallic Map, Smoothness Map, Reflection Mask, Specular Mask)]_MochieMetallicMaps ("Maps [Expand]--{reference_properties:[_MochieMetallicMapsPan, _MochieMetallicMapsUV, _MochieMetallicMapInvert, _MochieRoughnessMapInvert, _MochieReflectionMaskInvert, _MochieSpecularMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MochieMetallicMapsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_MochieMetallicMapsUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MochieMetallicMapInvert ("Invert Metallic", Float) = 0 + [HideInInspector][ToggleUI]_MochieRoughnessMapInvert ("Invert Smoothness", Float) = 0 + [HideInInspector][ToggleUI]_MochieReflectionMaskInvert ("Invert Reflection Mask", Float) = 0 + [HideInInspector][ToggleUI]_MochieSpecularMaskInvert ("Invert Specular Mask", Float) = 0 + [Space(8)] + + [ThryTexture][NoScaleOffset]_MochieReflCube ("Fallback Cubemap", Cube) = "" { } + [ToggleUI]_MochieForceFallback ("Force Fallback", Int) = 0 + [ToggleUI]_MochieLitFallback ("Lit Fallback", Float) = 0 + + [HideInInspector] m_end_brdf ("", Float) = 0 + + [HideInInspector] m_start_clearCoat ("Clear Coat--{reference_property:_EnableClearCoat}", Float) = 0 + [HideInInspector][ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + _ClearCoatSmoothnessMap ("Smoothness Map--{reference_properties:[_ClearCoatSmoothnessMapPan, _ClearCoatSmoothnessMapUV, _ClearCoatInvertSmoothness]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatSmoothnessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatSmoothnessMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearCoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + + _ClearCoatMask ("Mask--{reference_properties:[_ClearCoatMaskPan, _ClearCoatMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClearCoatMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ClearCoatMaskUV ("UV", Int) = 0 + + [NoScaleOffset]_ClearCoatCubeMap ("Fallback Cubemap", Cube) = "" { } + + [ThryWideEnum(Vertex, 0, Pixel, 1)]_ClearCoatNormal("Normal Select", Int) = 0 + + _ClearCoatTint ("Reflection Tint--{reference_property:_ClearCoatTintThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ClearCoatTintThemeIndex ("", Int) = 0 + _ClearCoat ("Clear Coat", Range(0, 1)) = 1 + _ClearCoatSmoothness ("Smoothness", Range(0, 1)) = 0 + [ToggleUI]_ClearCoatSampleWorld ("World Reflections", Int) = 1 + [ToggleUI]_ClearCoatForceLighting ("Force Lighting", Int) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + + [HideInInspector] m_start_reflectionRim ("Environmental Rim--{reference_property:_EnableEnvironmentalRim}", Float) = 0 + [HideInInspector][ThryToggle(POI_ENVIRORIM)]_EnableEnvironmentalRim ("Enable", Float) = 0 + _RimEnviroMask ("Mask--{reference_properties:[_RimEnviroMaskPan, _RimEnviroMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("", Float) = 0 + + [HideInInspector] m_start_stylizedSpec (" Stylized Specular--{reference_property:_StylizedSpecular}", Float) = 0 + [HideInInspector][ThryToggle(POI_STYLIZED_StylizedSpecular)]_StylizedSpecular ("Enable", Float) = 0 + + [ThryTexture]_HighColor_Tex ("Specular Map--{reference_properties:[_HighColor_TexPan, _HighColor_TexUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HighColor_TexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HighColor_TexUV ("UV", Int) = 0 + _HighColor ("Tint--{reference_property:_HighColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _HighColorThemeIndex ("", Int) = 0 + _Set_HighColorMask ("Mask--{reference_properties:[_Set_HighColorMaskPan, _Set_HighColorMaskUV, _Tweak_HighColorMaskLevel]}", 2D) = "white" { } + [HideInInspector][Vector2]_Set_HighColorMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_Set_HighColorMaskUV ("UV", Int) = 0 + [HideInInspector]_Tweak_HighColorMaskLevel ("Mask Level", Range(-1, 1)) = 0 + [ThryWideEnum(Toon, 0, Realistic, 1)]_Is_SpecularToHighColor ("Specular Mode", Float) = 0 + [ThryWideEnum(Replace, 0, Add, 1)]_Is_BlendAddToHiColor ("Color Blend Mode", Int) = 0 + + _StylizedSpecularStrength ("Strength", Float) = 1 + [ToggleUI] _UseLightColor ("Use Light Color", Float) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 1, 13)] + _HighColor_Power ("Size", Range(0, 1)) = 0.2 + _StylizedSpecularFeather ("Feather", Range(0, 1)) = 0 + _Layer1Strength ("Strength", Range(0, 1)) = 1 + [Space(8)] + + [ThryHeaderLabel(Layer 2, 13)] + _Layer2Size ("Size", Range(0, 1)) = 0 + _StylizedSpecular2Feather ("Feather", Range(0, 1)) = 0 + _Layer2Strength ("Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_stylizedSpec ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_specialFXCategory ("Special FX", Float) = 0 + // SPECIALFX_PROPERTIES + + // UDIM Discard + [HideInInspector] m_start_udimdiscardOptions ("UDIM Discard--{reference_property:_EnableUDIMDiscardOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_UDIMDISCARD)]_EnableUDIMDiscardOptions ("Enable UDIM Discard Options", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]_UDIMDiscardUV ("Discard UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _UDIMDiscardMode ("Discard Mode", Int) = 1 + [Vector4Toggles]_UDIMDiscardRow3 ("y = 3", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow2 ("y = 2", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow1 ("y = 1", Vector) = (1,1,1,1) + [Vector4Toggles]_UDIMDiscardRow0 ("y = 0", Vector) = (1,1,1,1) + [HideInInspector] m_end_udimdiscardOptions ("UDIM Discard", Float) = 0 + + // Dissolve + [HideInInspector] m_start_dissolve ("Dissolve--{reference_property:_EnableDissolve}", Float) = 0 + [HideInInspector][ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color--{reference_property:_DissolveEdgeColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveEdgeColorThemeIndex ("", Int) = 0 + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color--{reference_property:_DissolveTextureColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DissolveTextureColorThemeIndex ("", Int) = 0 + _DissolveToTexture ("Dissolved Texture--{reference_properties:[_DissolveToTexturePan, _DissolveToTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Gradient--{reference_properties:[_DissolveNoiseTexturePan, _DissolveNoiseTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Noise--{reference_properties:[_DissolveDetailNoisePan, _DissolveDetailNoiseUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask--{reference_properties:[_DissolveMaskPan, _DissolveMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DissolveMaskUV ("UV", Int) = 0 + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EnableDissolveAudioLink (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2]_AudioLinkDissolveDetail ("Dissolve Detail Mod--{ condition_showS:(_EnableDissolveAudioLink==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + + // Point to Point Dissolve + [HideInInspector] m_start_pointToPoint ("point to point--{condition_showS:(_DissolveType==2)}", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + + [HideInInspector] m_start_dissolveHueShift ("Hue Shift--{reference_property:_DissolveHueShiftEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0, 1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + + // Locked in anim sldiers + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + // Flipbook + [HideInInspector] m_start_flipBook ("Flipbook--{reference_property:_EnableFlipbook}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array--{reference_properties:[_FlipbookTexArrayPan, _FlipbookTexArrayUV]}", 2DArray) = "" { } + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookTexArrayUV ("UV", Int) = 0 + _FlipbookMask ("Mask--{reference_properties:[_FlipbookMaskPan, _FlipbookMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _FlipbookMaskUV ("UV", Int) = 0 + _FlipbookColor ("Color & alpha--{reference_property:_FlipbookColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _FlipbookColorThemeIndex ("", Int) = 0 + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + _FlipbookSideOffset ("Side Offset ←→↓↑", Vector) = (0, 0, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + + //Flipbook audio link + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI]_FlipbookChronotensityEnabled ("Chronotensity?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _FlipbookChronotensityBand ("Band", Int) = 0 + _FlipbookChronotensitySpeed ("Chrono Speed", Range(0,1)) = 1 + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + + // Flipbook Manual Control + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled ("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0, 1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + //TODO Add inverts to the masks + //Emission 1 + [HideInInspector] m_start_emissions ("Emissions", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission 0--{reference_property:_EnableEmission}", Float) = 0 + [HideInInspector][ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace0 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color--{reference_property:_EmissionColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColorThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap ("Emission Map--{reference_properties:[_EmissionMapPan, _EmissionMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMapUV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + _EmissionMask ("Emission Mask--{reference_properties:[_EmissionMaskPan, _EmissionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled (" Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled==1)}", Float) = 0 + + // Center out emission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled (" Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled==1)}", Float) = 5 + + // Glow in the dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type--{condition_showS:(_EnableGITDEmission==1)}", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting--{condition_showS:(_EnableGITDEmission==1)}", Range(0, 1)) = 1 + + // Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled (" Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 4 + _EmissionBlinkingOffset ("Offset--{condition_showS:(_EmissionBlinkingEnabled==1)}", Float) = 0 + + // Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve--{condition_showS:(_ScrollingEmission==1&&_EmissionScrollingUseCurve==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position--{condition_showS:(_ScrollingEmission==1)}", float) = 0 + _EmissiveScroll_Direction ("Direction--{condition_showS:(_ScrollingEmission==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Velocity ("Velocity--{condition_showS:(_ScrollingEmission==1)}", Float) = 10 + _EmissiveScroll_Interval ("Interval--{condition_showS:(_ScrollingEmission==1)}", Float) = 20 + _EmissionScrollingOffset ("Offset--{condition_showS:(_ScrollingEmission==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL0Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL0StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL0StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission0CenterOut ("Center Out--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission0CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission0CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission0CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL0Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emissionOptions ("", Float) = 0 + + // Second Emission + [HideInInspector] m_start_emission1Options ("Emission 1--{reference_property:_EnableEmission1}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_1)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace1 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color--{reference_property:_EmissionColor1ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor1ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap1 ("Emission Map--{reference_properties:[_EmissionMap1Pan, _EmissionMap1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap1UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + _EmissionMask1 ("Emission Mask--{reference_properties:[_EmissionMask1Pan, _EmissionMask1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled1 (" Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled1==1)}", Float) = 0 + + // Second Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled1 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled1==1)}", Float) = 5 + + // Second Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission1 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type--{condition_showS:(_EnableGITDEmission1==1)}", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting--{condition_showS:(_EnableGITDEmission1==1)}", Range(0, 1)) = 1 + + // Second Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled1 (" Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 4 + _EmissionBlinkingOffset1 ("Offset--{condition_showS:(_EmissionBlinkingEnabled1==1)}", Float) = 0 + + // Second Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission1 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve1==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position--{condition_showS:(_ScrollingEmission1==1)}", float) = 0 + _EmissiveScroll_Direction1 ("Direction--{condition_showS:(_ScrollingEmission1==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity--{condition_showS:(_ScrollingEmission1==1)}", Float) = 10 + _EmissiveScroll_Interval1 ("Interval--{condition_showS:(_ScrollingEmission1==1)}", Float) = 20 + _EmissionScrollingOffset1 ("Offset--{condition_showS:(_ScrollingEmission1==1)}", Float) = 0 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL1Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL1StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL1StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission1CenterOut ("Center Out--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission1CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission1CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL1Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission1Options ("", Float) = 0 + + // Third Emission + [HideInInspector] m_start_emission2Options ("Emission 2--{reference_property:_EnableEmission2}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_2)]_EnableEmission2 ("Enable Emission 2", Float) = 0 + [ToggleUI]_EmissionReplace2 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor2 ("Emission Color--{reference_property:_EmissionColor2ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor2ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap2 ("Emission Map--{reference_properties:[_EmissionMap2Pan, _EmissionMap2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap2UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap2 ("Base Color as Map?", Float) = 0 + _EmissionMask2 ("Emission Mask--{reference_properties:[_EmissionMask2Pan, _EmissionMask2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask2UV ("UV", Int) = 0 + _EmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled2 (" Hue Shift", Float) = 0 + _EmissionHueShift2 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed2 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled2==1)}", Float) = 0 + + // Third Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled2 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed2 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled2==1)}", Float) = 5 + + // Third Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission2 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh2 ("Lighting Type--{condition_showS:(_EnableGITDEmission2==1)}", Int) = 0 + _GITDEMinEmissionMultiplier2 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier2 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMinLight2 ("Min Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 0 + _GITDEMaxLight2 ("Max Lighting--{condition_showS:(_EnableGITDEmission2==1)}", Range(0, 1)) = 1 + + // Third Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled2 (" Blinking", Float) = 0 + _EmissiveBlink_Min2 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + _EmissiveBlink_Max2 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 1 + _EmissiveBlink_Velocity2 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 4 + _EmissionBlinkingOffset2 ("Offset--{condition_showS:(_EmissionBlinkingEnabled2==1)}", Float) = 0 + + // Third Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission2 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve2 ("Use Curve--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + [Curve]_EmissionScrollingCurve2 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve2==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor2 ("VColor as position--{condition_showS:(_ScrollingEmission2==1)}", float) = 0 + _EmissiveScroll_Direction2 ("Direction--{condition_showS:(_ScrollingEmission2==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width2 ("Width--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Velocity2 ("Velocity--{condition_showS:(_ScrollingEmission2==1)}", Float) = 10 + _EmissiveScroll_Interval2 ("Interval--{condition_showS:(_ScrollingEmission2==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL2Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL2StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL2StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission2CenterOut ("Center Out--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission2CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission2CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission2CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL2Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission2Options ("", Float) = 0 + + // Fourth Emission + [HideInInspector] m_start_emission3Options ("Emission 3--{reference_property:_EnableEmission3}", Float) = 0 + [HideInInspector][ThryToggle(POI_EMISSION_3)]_EnableEmission3 ("Enable Emission 3", Float) = 0 + [ToggleUI]_EmissionReplace3 ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor3 ("Emission Color--{reference_property:_EmissionColor3ThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _EmissionColor3ThemeIndex ("", Int) = 0 + [Gradient]_EmissionMap3 ("Emission Map--{reference_properties:[_EmissionMap3Pan, _EmissionMap3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMap3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMap3UV ("UV", Int) = 0 + [ToggleUI]_EmissionBaseColorAsMap3 ("Base Color as Map?", Float) = 0 + _EmissionMask3 ("Emission Mask--{reference_properties:[_EmissionMask3Pan, _EmissionMask3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _EmissionMask3UV ("UV", Int) = 0 + _EmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_EmissionHueShiftEnabled3 (" Hue Shift", Float) = 0 + _EmissionHueShift3 ("Hue Shift--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Range(0, 1)) = 0 + _EmissionHueShiftSpeed3 ("Hue Shift Speed--{condition_showS:(_EmissionHueShiftEnabled3==1)}", Float) = 0 + + // Fourth Center Out Enission + [Space(10)] + [ThryToggleUI(true)]_EmissionCenterOutEnabled3 (" Center Out", Float) = 0 + _EmissionCenterOutSpeed3 ("Flow Speed--{condition_showS:(_EmissionCenterOutEnabled3==1)}", Float) = 5 + + // Fourth Glow In The Dark Emission + [Space(10)] + [ThryToggleUI(true)]_EnableGITDEmission3 (" Light Based", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh3 ("Lighting Type--{condition_showS:(_EnableGITDEmission3==1)}", Int) = 0 + _GITDEMinEmissionMultiplier3 ("Min Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier3 ("Max Emission Multiplier--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMinLight3 ("Min Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 0 + _GITDEMaxLight3 ("Max Lighting--{condition_showS:(_EnableGITDEmission3==1)}", Range(0, 1)) = 1 + + // Fourth Blinking Emission + [Space(10)] + [ThryToggleUI(true)]_EmissionBlinkingEnabled3 (" Blinking", Float) = 0 + _EmissiveBlink_Min3 ("Emissive Blink Min--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + _EmissiveBlink_Max3 ("Emissive Blink Max--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 1 + _EmissiveBlink_Velocity3 ("Emissive Blink Velocity--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 4 + _EmissionBlinkingOffset3 ("Offset--{condition_showS:(_EmissionBlinkingEnabled3==1)}", Float) = 0 + + // Fourth Scrolling Emission + [Space(10)] + [ThryToggleUI(true)] _ScrollingEmission3 (" Scrolling", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve3 ("Use Curve--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + [Curve]_EmissionScrollingCurve3 ("Curve--{condition_showS:(_ScrollingEmission1==1&&_EmissionScrollingUseCurve3==1)}", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor3 ("VColor as position--{condition_showS:(_ScrollingEmission3==1)}", float) = 0 + _EmissiveScroll_Direction3 ("Direction--{condition_showS:(_ScrollingEmission3==1)}", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width3 ("Width--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Velocity3 ("Velocity--{condition_showS:(_ScrollingEmission3==1)}", Float) = 10 + _EmissiveScroll_Interval3 ("Interval--{condition_showS:(_ScrollingEmission3==1)}", Float) = 20 + + [Space(10)] + [ThryToggleUI(true)] _EmissionAL3Enabled (" Audio Link--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Vector2]_EmissionAL3StrengthMod ("Emission Strength Add--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _EmissionAL3StrengthBand ("Emission Add Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [Vector2] _AudioLinkEmission3CenterOut ("Center Out--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Vector) = (0, 0, 0, 0) + _AudioLinkEmission3CenterOutwidth ("Center Out Duration--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 1 + _AudioLinkEmission3CenterOutSize ("Intensity Threshold--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Range(0, 1)) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission3CenterOutBand ("Center Out Band--{ condition_showS:(_EmissionAL3Enabled==1 && _EnableAudioLink==1)}", Int) = 0 + [HideInInspector] m_end_emission3Options ("", Float) = 0 + [HideInInspector] m_end_emissions ("Emissions", Float) = 0 + + // Glitter + [HideInInspector] m_start_glitter ("Glitter / Sparkle--{reference_property:_GlitterEnable}", Float) = 0 + [HideInInspector][ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterUV ("UV", Int) = 0 + [Enum(Angle, 0, Linear Emission, 1, Light Reflections, 2)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color--{reference_property:_GlitterColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _GlitterColorThemeIndex ("", Int) = 0 + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map--{reference_properties:[_GlitterColorMapPan, _GlitterColorMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask--{reference_properties:[_GlitterMaskPan, _GlitterMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_showS:(_GlitterMode==0||_GlitterMode==2)}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:(_GlitterMode==0)}", Range(0, 1)) = .8 + _GlitterHideInShadow ("Hide in shadow", Range(0, 1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterHueShiftEnabled (" Hue Shift", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed--{condition_showS:(_GlitterHueShiftEnabled==1)}", Float) = 0 + _GlitterHueShift ("Hue Shift--{condition_showS:(_GlitterHueShiftEnabled==1)}", Range(0, 1)) = 0 + + [Space(10)] + [ThryToggleUI(true)]_GlitterRandomColors (" Random Stuff", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize ("Random Size?--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range--{condition_showS:(_GlitterRandomColors==1)}", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation ("Random Tex Rotation--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_end_glitter ("Glitter / Sparkle--{condition_showS:(_GlitterRandomColors==1)}", Float) = 0 + + [HideInInspector] m_start_pathing ("Pathing--{reference_property: _EnablePathing}", Float) = 0 + [HideInInspector][ThryToggle(POI_PATHING)] _EnablePathing ("Enable Pathing", Float) = 0 + [ThryExternalTextureToolDrawer(Flood Tool,DreadScripts.GradientFlood)]_PathingMap ("RGB Path Map | A Mask--{reference_properties:[_PathingMapPan, _PathingMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingMapPan ("Panning", Vector) = (0, 0, 0, 0) + _PathingColorMap ("RGB Color | A Mask--{reference_properties:[_PathingColorMapPan, _PathingColorMapUV]}", 2D) = "white" { } + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PathingColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_PathingColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeR ("R Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeG ("G Path Type", Float) = 0 + [Enum(Fill, 0, Path, 1, Loop, 2)]_PathTypeB ("B Path Type", Float) = 0 + [HDR]_PathColorR ("R Color--{reference_property:_PathColorRThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorRThemeIndex ("", Int) = 0 + [HDR]_PathColorG ("G Color--{reference_property:_PathColorGThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorGThemeIndex ("", Int) = 0 + [HDR]_PathColorB ("B Color--{reference_property:_PathColorBThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _PathColorBThemeIndex ("", Int) = 0 + [Vector3]_PathEmissionStrength ("Emission Strength", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSoftness ("Softness", Vector) = (1, 1, 1, 1) + [Vector3]_PathSpeed ("Speed", Vector) = (1.0, 1.0, 1.0, 1) + [Vector3]_PathWidth ("Length", Vector) = (0.03, 0.03, 0.03, 1) + + [Header(Timing Options)] + [Vector3]_PathTime ("Manual Timing", Vector) = (-999.0, -999.0, -999.0, 1) + [Vector3]_PathOffset ("Timing Offset", Vector) = (0.0, 0.0, 0.0, 1) + [Vector3]_PathSegments ("Path Segments", Vector) = (0.0, 0.0, 0.0, 1) + + [HideInInspector] m_start_PathAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + // Time Offsets + [Header(Time Offset)] + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandR ("Band R", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetR ("Offset R", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandG ("Band G", Int) = 0 + [Vector2]_AudioLinkPathTimeOffsetG ("Offset G", Vector) = (0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkPathTimeOffsetBandB ("Band B", Int) = 0 + + [Vector2]_AudioLinkPathTimeOffsetB ("Offset B", Vector) = (0, 0, 0) + [HideInInspector] m_end_PathAudioLink ("", Float) = 0 + [HideInInspector] m_end_pathing ("", Float) = 0 + + // Mirror Rendering + [HideInInspector] m_start_mirrorOptions ("Mirror--{reference_property:_EnableMirrorOptions}", Float) = 0 + [HideInInspector][ThryToggle(POI_MIRROR)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [ThryWideEnum(Show In Both, 0, Show Only In Mirror, 1, Dont Show In Mirror, 2)] _Mirror ("Show in mirror", Int) = 0 + _MirrorTexture ("Mirror Texture--{reference_properties:[_MirrorTexturePan, _MirrorTextureUV]},", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _MirrorTextureUV("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + + [HideInInspector] m_start_depthFX ("Depth FX--{reference_property:_EnableTouchGlow}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Depth FX", Float) = 0 + _DepthMask ("Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthMaskUV ("UV", Int) = 0 + + [Space(10)] + [ThryToggleUI(true)]_DepthColorToggle (" Color & Emission", Float) = 0 + [ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)] _DepthColorBlendMode ("Blend Type--{condition_showS:(_DepthColorToggle==1)}", Int) = 0 + _DepthTexture ("Depth Texture--{reference_properties:[_DepthTexturePan, _DepthTextureUV], condition_showS:(_DepthColorToggle==1)}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _DepthTextureUV ("UV", Int) = 0 + _DepthColor ("Color--{condition_showS:(_DepthColorToggle==1), reference_property:_DepthColorThemeIndex}", Color) = (1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _DepthColorThemeIndex ("", Int) = 0 + _DepthEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DepthColorMinDepth ("Min Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 0 + _DepthColorMaxDepth ("Max Depth--{condition_showS:(_DepthColorToggle==1)}", Float) = 1 + _DepthColorMinValue ("Min Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 0 + _DepthColorMaxValue ("Max Color Blend--{condition_showS:(_DepthColorToggle==1)}", Range(0, 1)) = 1 + + [Space(10)] + [ThryToggleUI(true)]_DepthAlphaToggle (" Alpha", Float) = 0 + _DepthAlphaMinDepth ("Min Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 0 + _DepthAlphaMaxDepth ("Max Depth--{condition_showS:(_DepthAlphaToggle==1)}", Float) = 1 + _DepthAlphaMinValue ("Min Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 0 + _DepthAlphaMaxValue ("Max Alpha--{condition_showS:(_DepthAlphaToggle==1)}", Range(0, 1)) = 1 + [HideInInspector] m_end_depthFX ("Depth FX", Float) = 0 + + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence}", Float) = 0 + [HideInInspector][ThryToggle(POI_IRIDESCENCE)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp--{reference_properties:[_IridescenceRampPan]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceRampPan ("Panning", Vector) = (0, 0, 0, 0) + + _IridescenceMask ("Mask--{reference_properties:[_IridescenceMaskPan, _IridescenceMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_IridescenceMaskPan("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceMaskUV ("Mask UV", Int) = 0 + + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map--{reference_properties:[_IridescenceNormalIntensity, _IridescenceNormalMapPan, _IridescenceNormalMapUV]}", 2D) = "bump" { } + [HideInInspector]_IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_IridescenceNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_IridescenceNormalMapUV ("Normal UV", Int) = 0 + [Enum(Vertex, 0, Pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [Header(Hue Shift)] + [ToggleUI]_IridescenceHueShiftEnabled ("Enable", Float) = 0 + _IridescenceHueShiftSpeed ("Speed", Float) = 0 + _IridescenceHueShift ("Shift", Range(0,1)) = 0 + + // Iridescence Audio Link + [HideInInspector] m_start_IridescenceAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _IridescenceAudioLinkEmissionBand ("Scale Band", Int) = 0 + [Vector2]_IridescenceAudioLinkEmission("Scale Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_IridescenceAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + + // MSDF OVERLAY + [HideInInspector] m_start_Text ("Stats Overlay--{reference_property:_TextEnabled}", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [HideInInspector][ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + + // FPS + [HideInInspector] m_start_TextFPS ("FPS--{reference_property:_TextFPSEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color--{reference_property:_TextFPSColorThemeIndex}", Color) = (1, 1, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextFPSColorThemeIndex ("", Int) = 0 + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + + // POSITION + [HideInInspector] m_start_TextPosition ("Position--{reference_property:_TextPositionEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextPositionUV ("Position UV", Int) = 0 + //[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 + _TextPositionColor ("Color--{reference_property:_TextPositionColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextPositionColorThemeIndex ("", Int) = 0 + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + + // INSTANCE TIME + [HideInInspector] m_start_TextInstanceTime ("Instance Time--{reference_property:_TextTimeEnabled}", Float) = 0 + [HideInInspector][ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color--{reference_property:_TextTimeColorThemeIndex}", Color) = (1, 0, 1, 1) + [HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TextTimeColorThemeIndex ("", Int) = 0 + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + + // Poi Extras + // Audio link + [HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink}", Float) = 0 + [HideInInspector] m_start_audioLink ("Audio Link", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0 + [ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1 + /* + _AudioLinkDelay ("Delay", Range(0, 1)) = 0 + [ToggleUI]_AudioLinkCCStripY("CC Strip Y UV", Float) = 0 + */ + //[ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 + //_AudioLinkAverageRange ("Average Sampling Range", Range(0, 1)) = .5 + [ThryHeaderLabel(Debug Visualizer, 13)] + [ToggleUI]_DebugWaveform("Waveform", Float) = 0 + [ToggleUI]_DebugDFT("DFT", Float) = 0 + [ToggleUI]_DebugBass("Bass", Float) = 0 + [ToggleUI]_DebugLowMids("Low Mids", Float) = 0 + [ToggleUI]_DebugHighMids("High Mids", Float) = 0 + [ToggleUI]_DebugTreble("Treble", Float) = 0 + [ToggleUI]_DebugCCColors("Colorchord Colors", Float) = 0 + [ToggleUI]_DebugCCStrip("Colorchord Strip", Float) = 0 + [ToggleUI]_DebugCCLights("Colorchord Lights", Float) = 0 + [ToggleUI]_DebugAutocorrelator("Autocorrelator", Float) = 0 + [ToggleUI]_DebugChronotensity("Chronotensity", Float) = 0 + [Helpbox(1)]_DebugVisualizerHelpbox ("Debug examples are best viewed on a flat surface with simple uvs like a default unity quad.", Int) = 0 + + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + + [HideInInspector] m_start_ALDecalSpectrum ("AL ♫ Spectrum--{ reference_property:_EnableALDecal}", Float) = 0 + [HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0 + [HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0 + + [ThryHeaderLabel(Transform, 13)] + [Space(4)] + [Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)] _ALDecalUV ("UV", Int) = 0 + [Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1) + _ALUVScale ("Scale", Vector) = (1, 1, 1, 1) + _ALUVRotation ("Rotation", Range(0, 360)) = 0 + _ALUVRotationSpeed ("Rotation Speed", Float) = 0 + _ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0 + _ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1) + + [Space][ThryHeaderLabel(Volume, 13)] + [Space(4)] + _ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0 + _ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0 + _ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryHeaderLabel(Band, 13)] + [Space(4)] + _ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0 + _ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0 + _ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0 + + [Space][ThryToggleUI(true)]_ALDecalShapeClip (" Shape Clip", Float) = 0 + _ALDecalShapeClipVolumeWidth ("Volume Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + _ALDecalShapeClipBandWidth ("Band Width--{ condition_showS:_ALDecalShapeClip==1}", Range(0, 1)) = 0.5 + + [Space][ThryHeaderLabel(Audio Mods, 13)] + [Space(4)] + _ALDecalVolume ("Volume", Int) = 0.5 + _ALDecalBaseBoost ("Bass Boost", Float) = 5.0 + _ALDecalTrebleBoost ("Treble Boost", Float) = 1.0 + + [Space][ThryHeaderLabel(Colors and Blending, 13)] + [Space(4)] + [Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1 + _ALDecalVolumeColorLow ("Volume Color Low", Color) = (0, 0, 1) + _ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorMid ("Volume Color Mid", Color) = (0, 1, 0) + _ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0 + _ALDecalVolumeColorHigh ("Volume Color High", Color) = (1, 0, 0) + _ALDecalHighEmission ("High Emission", Range(0, 20)) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge(Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0 + _ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1 + _ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0 + + [HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0 + + // Rendering Options + [HideInInspector] m_modifierCategory ("Modifiers", Float) = 0 + [HideInInspector] m_start_uvDistortion (" Distortion UV--{reference_property:_EnableDistortion}", Float) = 0 + [HideInInspector][ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionUvToDistort ("Distorted UV", Int) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1--{reference_properties:[_DistortionFlowTexturePan, _DistortionFlowTextureUV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTextureUV ("UV", Int) = 0 + _DistortionFlowTexture1 ("Distortion Texture 2--{reference_properties:[_DistortionFlowTexture1Pan, _DistortionFlowTexture1UV]}", 2D) = "black" { } + [HideInInspector][Vector2]_DistortionFlowTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6)] _DistortionFlowTexture1UV ("UV", Int) = 0 + _DistortionStrength ("Strength1", Float) = 0.03 + _DistortionStrength1 ("Strength2", Float) = 0.01 + [HideInInspector] m_end_uvDistortion ("Distortion UV", Float) = 0 + + [HideInInspector] m_start_uvPanosphere ("Panosphere UV", Float) = 0 + [ToggleUI] _StereoEnabled ("Stereo Enabled", Float) = 0 + [ToggleUI] _PanoUseBothEyes ("Perspective Correct (VR)", Float) = 1 + [HideInInspector] m_end_uvPanosphere ("Panosphere UV", Float) = 0 + + [HideInInspector] m_start_uvPolar ("Polar UV", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5)] _PolarUV ("UV", Int) = 0 + [Vector2]_PolarCenter ("Center Coordinate", Vector) = (.5, .5, 0, 0) + _PolarRadialScale ("Radial Scale", Float) = 1 + _PolarLengthScale ("Length Scale", Float) = 1 + _PolarSpiralPower ("Spiral Power", Float) = 0 + [HideInInspector] m_end_uvPolar ("Polar UV", Float) = 0 + + [HideInInspector] m_start_parallax (" Parallax Heightmapping--{reference_property:_PoiParallax}", Float) = 0 + [HideInInspector][ThryToggle(POI_PARALLAX)]_PoiParallax ("Enable", Float) = 0 + [ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_ParallaxUV ("Applies To: ", Int) = 0 + + [ThryTexture]_HeightMap ("Heightmap--{reference_properties:[_HeightMapPan, _HeightMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightMapUV ("UV", Int) = 0 + + /* + [ThryTexture]_Heightmask ("Mask--{reference_properties:[_HeightmaskPan, _HeightmaskUV, _HeightmaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_HeightmaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_HeightmaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_HeightmaskUV ("UV", Int) = 0 + */ + + _HeightStrength ("Strength", Range(0, 1)) = 0.4247461 + //_HeightOffset ("Offset", Range(-1, 1)) = 0 + _CurvatureU ("Curvature U", Range(0, 100)) = 0 + _CurvatureV ("Curvature V", Range(0, 30)) = 0 + [IntRange]_HeightStepsMin ("Steps Min", Range(0, 128)) = 10 + [IntRange]_HeightStepsMax ("Steps Max", Range(0, 128)) = 128 + _CurvFix ("Curvature Bias", Range(0, 1)) = 1 + // [ThryToggle]_ParallaxUV0 ("UV0", Float) = 0 + // [ThryToggle]_ParallaxUV1 ("UV1", Float) = 0 + // [ThryToggle]_ParallaxUV2 ("UV2", Float) = 0 + // [ThryToggle]_ParallaxUV3 ("UV3", Float) = 0 + // [ThryToggle]_ParallaxPano ("Panosphere", Float) = 0 + // [ThryToggle]_ParallaxWorldPos ("World Pos", Float) = 0 + // [ThryToggle]_ParallaxPolar ("Polar", Float) = 0 + // [ThryToggle]_ParallaxDist ("Distorted UV", Float) = 0 + + [HideInInspector] m_end_parallax ("Parallax Heightmapping", Float) = 0 + + //Third party + [HideInInspector] m_thirdpartyCategory ("Third Party", Float) = 0 + + // Rendering Options + [HideInInspector] m_postprocessing ("Post Processing", Float) = 0 + [HideInInspector] m_start_PoiLightData ("PP Animations ", Float) = 0 + [Helpbox(1)] _PPHelp ("This section meant for rael time adjustments through animations and not to be changed in unity", Int) = 0 + _PPLightingMultiplier ("Lighting Mulitplier", Float) = 1 + _PPLightingAddition ("Lighting Add", Float) = 0 + _PPEmissionMultiplier ("Emission Multiplier", Float) = 1 + _PPFinalColorMultiplier ("Final Color Multiplier", Float) = 1 + [HideInInspector] m_end_PoiLightData ("PP Animations ", Float) = 0 + + [HideInInspector] m_start_postprocess ("Post Processing--{reference_property:_PostProcess}", Float) = 0 + [HideInInspector][ThryToggle(MOCHIE_POSTPROCESS)]_PostProcess ("Enable", Float) = 0 + [ThryTexture] _PPMask("Mask--{reference_properties:[_PPMaskPan, _PPMaskUV, _PPMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_PPMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][ToggleUI]_PPMaskInvert ("Invert", Float) = 0 + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7)]_PPMaskUV ("UV", Int) = 0 + + [NoScaleOffset][ThryTexture] _PPLUT("LUT", 2D) = "white" {} + _PPLUTStrength("LUT Strength", Range(0,1)) = 0 + _PPHue("Hue", Range(0,1)) = 0 + [HDR]_PPTint("Tint", Color) = (1,1,1,1) + [Vector3]_PPRGB("RGB", Vector) = (1,1,1,1) + _PPContrast("Contrast", Float) = 1 + _PPSaturation("Saturation", Float) = 1 + _PPBrightness("Brightness", Float) = 1 + _PPLightness("Lightness", Float) = 0 + _PPHDR("HDR", Float) = 0 + + [HideInInspector] m_end_postprocess ("", Float) = 0 + + // Rendering Options + [HideInInspector] m_renderingCategory ("Rendering", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_RenderingReduceClipDistance ("Reduce Clip Distance", Float) = 0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + + // Blending Options + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + + // Stencils + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [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.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + + } + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry" "VRCFallback" = "Standard" } + + Pass + { + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma shader_feature VERTEXLIGHT_ON + #pragma multi_compile_fwdbase + #pragma multi_compile_instancing + #pragma multi_compile_fog + #pragma multi_compile _ VERTEXLIGHT_ON + #define POI_PASS_BASE + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _EMISSION + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap; + #endif + float4 _EmissionMap_ST; + float2 _EmissionMapPan; + float _EmissionMapUV; + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask; + #endif + float4 _EmissionMask_ST; + float2 _EmissionMaskPan; + float _EmissionMaskUV; + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve; + #endif + float4 _EmissionScrollingCurve_ST; + + float4 _EmissionColor; + float _EmissionBaseColorAsMap; + float _EmissionStrength; + float _EmissionHueShiftEnabled; + float _EmissionHueShift; + float _EmissionHueShiftSpeed; + float _EmissionCenterOutEnabled; + float _EmissionCenterOutSpeed; + float _EnableGITDEmission; + float _GITDEWorldOrMesh; + float _GITDEMinEmissionMultiplier; + float _GITDEMaxEmissionMultiplier; + float _GITDEMinLight; + float _GITDEMaxLight; + float _EmissionBlinkingEnabled; + float _EmissiveBlink_Min; + float _EmissiveBlink_Max; + float _EmissiveBlink_Velocity; + float _EmissionBlinkingOffset; + float _ScrollingEmission; + float4 _EmissiveScroll_Direction; + float _EmissiveScroll_Width; + float _EmissiveScroll_Velocity; + float _EmissiveScroll_Interval; + float _EmissionScrollingOffset; + + float _EmissionReplace0; + float _EmissionScrollingVertexColor; + float _EmissionScrollingUseCurve; + float _EmissionColorThemeIndex; + + // Audio Link + float _EmissionAL0Enabled; + float2 _EmissionAL0StrengthMod; + float _EmissionAL0StrengthBand; + float2 _AudioLinkEmission0CenterOut; + float _AudioLinkEmission0CenterOutwidth; + float _AudioLinkEmission0CenterOutSize; + float _AudioLinkEmission0CenterOutBand; + #endif + + #ifdef POI_EMISSION_1 + + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap1; + #endif + float4 _EmissionMap1_ST; + float2 _EmissionMap1Pan; + float _EmissionMap1UV; + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask1; + #endif + float4 _EmissionMask1_ST; + float2 _EmissionMask1Pan; + float _EmissionMask1UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve1; + #endif + float4 _EmissionScrollingCurve1_ST; + + float4 _EmissionColor1; + float _EmissionBaseColorAsMap1; + float _EmissionStrength1; + float _EnableEmission1; + float _EmissionHueShift1; + float _EmissionHueShiftSpeed1; + float4 _EmissiveScroll_Direction1; + float _EmissiveScroll_Width1; + float _EmissiveScroll_Velocity1; + float _EmissiveScroll_Interval1; + float _EmissionBlinkingEnabled1; + float _EmissiveBlink_Min1; + float _EmissiveBlink_Max1; + float _EmissiveBlink_Velocity1; + float _ScrollingEmission1; + float _EnableGITDEmission1; + float _GITDEMinEmissionMultiplier1; + float _GITDEMaxEmissionMultiplier1; + float _GITDEMinLight1; + float _GITDEMaxLight1; + float _GITDEWorldOrMesh1; + float _EmissionCenterOutEnabled1; + float _EmissionCenterOutSpeed1; + float _EmissionHueShiftEnabled1; + float _EmissionBlinkingOffset1; + float _EmissionScrollingOffset1; + float _EmissionScrollingVertexColor1; + float _EmissionScrollingUseCurve1; + float _EmissionReplace1; + float _EmissionColor1ThemeIndex; + + // Audio Link + float _EmissionAL1Enabled; + float2 _EmissionAL1StrengthMod; + float _EmissionAL1StrengthBand; + float2 _AudioLinkEmission1CenterOut; + float _AudioLinkEmission1CenterOutwidth; + float _AudioLinkEmission1CenterOutSize; + float _AudioLinkEmission1CenterOutBand; + #endif + + #ifdef POI_EMISSION_2 + + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap2; + #endif + float4 _EmissionMap2_ST; + float2 _EmissionMap2Pan; + float _EmissionMap2UV; + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask2; + #endif + float4 _EmissionMask2_ST; + float2 _EmissionMask2Pan; + float _EmissionMask2UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve2; + #endif + float4 _EmissionScrollingCurve2_ST; + + float4 _EmissionColor2; + float _EmissionBaseColorAsMap2; + float _EmissionStrength2; + float _EnableEmission2; + float _EmissionHueShift2; + float _EmissionHueShiftSpeed2; + float4 _EmissiveScroll_Direction2; + float _EmissiveScroll_Width2; + float _EmissiveScroll_Velocity2; + float _EmissiveScroll_Interval2; + float _EmissionBlinkingEnabled2; + float _EmissiveBlink_Min2; + float _EmissiveBlink_Max2; + float _EmissiveBlink_Velocity2; + float _ScrollingEmission2; + float _EnableGITDEmission2; + float _GITDEMinEmissionMultiplier2; + float _GITDEMaxEmissionMultiplier2; + float _GITDEMinLight2; + float _GITDEMaxLight2; + float _GITDEWorldOrMesh2; + float _EmissionCenterOutEnabled2; + float _EmissionCenterOutSpeed2; + float _EmissionHueShiftEnabled2; + float _EmissionBlinkingOffset2; + float _EmissionScrollingOffset2; + float _EmissionScrollingVertexColor2; + float _EmissionScrollingUseCurve2; + float _EmissionReplace2; + float _EmissionColor2ThemeIndex; + + // Audio Link + float _EmissionAL2Enabled; + float2 _EmissionAL2StrengthMod; + float _EmissionAL2StrengthBand; + float2 _AudioLinkEmission2CenterOut; + float _AudioLinkEmission2CenterOutwidth; + float _AudioLinkEmission2CenterOutSize; + float _AudioLinkEmission2CenterOutBand; + #endif + + #ifdef POI_EMISSION_3 + + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMap3; + #endif + float4 _EmissionMap3_ST; + float2 _EmissionMap3Pan; + float _EmissionMap3UV; + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionMask3; + #endif + float4 _EmissionMask3_ST; + float2 _EmissionMask3Pan; + float _EmissionMask3UV; + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + Texture2D _EmissionScrollingCurve3; + #endif + float4 _EmissionScrollingCurve3_ST; + + float4 _EmissionColor3; + float _EmissionBaseColorAsMap3; + float _EmissionStrength3; + float _EnableEmission3; + float _EmissionHueShift3; + float _EmissionHueShiftSpeed3; + float4 _EmissiveScroll_Direction3; + float _EmissiveScroll_Width3; + float _EmissiveScroll_Velocity3; + float _EmissiveScroll_Interval3; + float _EmissionBlinkingEnabled3; + float _EmissiveBlink_Min3; + float _EmissiveBlink_Max3; + float _EmissiveBlink_Velocity3; + float _ScrollingEmission3; + float _EnableGITDEmission3; + float _GITDEMinEmissionMultiplier3; + float _GITDEMaxEmissionMultiplier3; + float _GITDEMinLight3; + float _GITDEMaxLight3; + float _GITDEWorldOrMesh3; + float _EmissionCenterOutEnabled3; + float _EmissionCenterOutSpeed3; + float _EmissionHueShiftEnabled3; + float _EmissionBlinkingOffset3; + float _EmissionScrollingOffset3; + float _EmissionScrollingVertexColor3; + float _EmissionScrollingUseCurve3; + float _EmissionReplace3; + float _EmissionColor3ThemeIndex; + + // Audio Link + float _EmissionAL3Enabled; + float2 _EmissionAL3StrengthMod; + float _EmissionAL3StrengthBand; + float2 _AudioLinkEmission3CenterOut; + float _AudioLinkEmission3CenterOutwidth; + float _AudioLinkEmission3CenterOutSize; + float _AudioLinkEmission3CenterOutBand; + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + float _PPLightingMultiplier; + float _PPLightingAddition; + float _PPEmissionMultiplier; + float _PPFinalColorMultiplier; + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled, in float worldOrMesh, in PoiLight poiLight) + { + float glowInTheDarkMultiplier = 1; + //UNITY_BRANCH + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = worldOrMesh ? calculateluminance(poiLight.finalLighting.rgb) : calculateluminance(poiLight.directLighting.rgb); + float gitdeAlpha = saturate(inverseLerp(minLight, maxLight, lightValue)); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; + } + + float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) + { + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; + } + + float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) + { + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; + } + + void applyALEmmissionStrength(in PoiMods poiMods, inout float emissionStrength, in float2 emissionStrengthMod, in float emissionStrengthBand, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionStrengthMod.x, emissionStrengthMod.y, poiMods.audioLink[emissionStrengthBand]); + } + #endif + } + + void applyALCenterOutEmission(in PoiMods poiMods, in float nDotV, inout float emissionStrength, in float width, in float size, in float band, in float2 emissionToAdd, in float enabled) + { + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && enabled) + { + emissionStrength += lerp(emissionToAdd.x, emissionToAdd.y, getBandAtTime(band, saturate(1 - nDotV), width, size)); + } + #endif + } + + #ifdef _EMISSION + float3 applyEmission(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // First Emission + float3 emission0 = 0; + float emissionStrength0 = _EmissionStrength; + float3 emissionColor0 = 0; + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(_GITDEMinLight, _GITDEMaxLight, _GITDEMinEmissionMultiplier, _GITDEMaxEmissionMultiplier, _EnableGITDEmission, _GITDEWorldOrMesh, poiLight); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionMap_ST), _EmissionMapPan).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap_ST.xy) + _Time.x * _EmissionCenterOutSpeed).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + } + #else + emissionColor0 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap).rgb * poiThemeColor(poiMods, _EmissionColor.rgb, _EmissionColorThemeIndex); + #endif + + //UNITY_BRANCH + if (_ScrollingEmission) + { + float3 pos = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor) + { + pos = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, poiUV(poiMesh.uv[_EmissionMapUV], _EmissionScrollingCurve_ST) + (dot(pos, _EmissiveScroll_Direction.xyz) * _EmissiveScroll_Interval) + _Time.x * _EmissiveScroll_Velocity).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(_EmissiveScroll_Direction.xyz, _EmissiveScroll_Velocity, _EmissiveScroll_Interval, _EmissiveScroll_Width, _EmissionScrollingOffset, pos); + } + } + + //UNITY_BRANCH + if (_EmissionBlinkingEnabled) + { + emissionStrength0 *= calculateBlinkingEmission(_EmissiveBlink_Min, _EmissiveBlink_Max, _EmissiveBlink_Velocity, _EmissionBlinkingOffset); + } + + emissionColor0 = hueShift(emissionColor0, frac(_EmissionHueShift + _EmissionHueShiftSpeed * _Time.x) * _EmissionHueShiftEnabled); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, poiUV(poiMesh.uv[_EmissionMaskUV], _EmissionMask_ST) + _Time.x * _EmissionMaskPan).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission != 4) + { + emissionMask0 *= blackLightMask[_BlackLightMaskEmission]; + } + #endif + + applyALEmmissionStrength(poiMods, emissionStrength0, _EmissionAL0StrengthMod, _EmissionAL0StrengthBand, _EmissionAL0Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength0, _AudioLinkEmission0CenterOutwidth, _AudioLinkEmission0CenterOutSize, _AudioLinkEmission0CenterOutBand, _AudioLinkEmission0CenterOut, _EmissionAL0Enabled); + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = max(emissionStrength0 * emissionColor0, 0); + + #ifdef POI_DISSOLVE + //UNITY_BRANCH + if (_DissolveEmissionSide != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, _DissolveEmissionSide); + } + #endif + + // poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emission0 + emission1), _EmissionReplace * poiMax(emission0 + emission1)); + + poiFragData.emission += emission0; + return emission0 * _EmissionReplace0; + } + #endif + + #ifdef POI_EMISSION_1 + float3 applyEmission1(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + emissionStrength1 = _EmissionStrength1; + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(_GITDEMinLight1, _GITDEMaxLight1, _GITDEMinEmissionMultiplier1, _GITDEMaxEmissionMultiplier1, _EnableGITDEmission1, _GITDEWorldOrMesh1, poiLight); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled1) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionMap1_ST), _EmissionMap1Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap1_ST.xy) + _Time.x * _EmissionCenterOutSpeed1).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + } + #else + emissionColor1 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap1).rgb * poiThemeColor(poiMods, _EmissionColor1.rgb, _EmissionColor1ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission1) + { + float3 pos1 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor1) + { + pos1 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve1) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, poiUV(poiMesh.uv[_EmissionMap1UV], _EmissionScrollingCurve1_ST) + (dot(pos1, _EmissiveScroll_Direction1) * _EmissiveScroll_Interval1) + _Time.x * _EmissiveScroll_Velocity1); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(_EmissiveScroll_Direction1, _EmissiveScroll_Velocity1, _EmissiveScroll_Interval1, _EmissiveScroll_Width1, _EmissionScrollingOffset1, pos1); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled1) + { + emissionStrength1 *= calculateBlinkingEmission(_EmissiveBlink_Min1, _EmissiveBlink_Max1, _EmissiveBlink_Velocity1, _EmissionBlinkingOffset1); + } + + emissionColor1 = hueShift(emissionColor1, frac(_EmissionHueShift1 + _EmissionHueShiftSpeed1 * _Time.x) * _EmissionHueShiftEnabled1); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, poiUV(poiMesh.uv[_EmissionMask1UV], _EmissionMask1_ST) + _Time.x * _EmissionMask1Pan); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskEmission2 != 4) + { + emissionMask1 *= blackLightMask[_BlackLightMaskEmission2]; + } + #endif + applyALEmmissionStrength(poiMods, emissionStrength1, _EmissionAL1StrengthMod, _EmissionAL1StrengthBand, _EmissionAL1Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength1, _AudioLinkEmission1CenterOutwidth, _AudioLinkEmission1CenterOutSize, _AudioLinkEmission1CenterOutBand, _AudioLinkEmission1CenterOut, _EmissionAL1Enabled); + + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = max(emissionStrength1 * emissionColor1, 0); + + poiFragData.emission += emission1; + return emission1 * _EmissionReplace1; + } + #endif + + #ifdef POI_EMISSION_2 + float3 applyEmission2(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission2 = 0; + float emissionStrength2 = 0; + float3 emissionColor2 = 0; + + emissionStrength2 = _EmissionStrength2; + + float glowInTheDarkMultiplier2 = calculateGlowInTheDark(_GITDEMinLight2, _GITDEMaxLight2, _GITDEMinEmissionMultiplier2, _GITDEMaxEmissionMultiplier2, _EnableGITDEmission2, _GITDEWorldOrMesh2, poiLight); + #if defined(PROP_EMISSIONMAP2) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled2) + { + emissionColor2 = POI2D_SAMPLER_PAN(_EmissionMap2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionMap2_ST), _EmissionMap2Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + else + { + emissionColor2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap2, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap2_ST.xy) + _Time.x * _EmissionCenterOutSpeed2).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + } + #else + emissionColor2 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap2).rgb * poiThemeColor(poiMods, _EmissionColor2.rgb, _EmissionColor2ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission2) + { + float3 pos2 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor2) + { + pos2 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve2) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE2) || !defined(OPTIMIZER_ENABLED) + emissionStrength2 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve2, _MainTex, poiUV(poiMesh.uv[_EmissionMap2UV], _EmissionScrollingCurve2_ST) + (dot(pos2, _EmissiveScroll_Direction2) * _EmissiveScroll_Interval2) + _Time.x * _EmissiveScroll_Velocity2); + #endif + } + else + { + emissionStrength2 *= calculateScrollingEmission(_EmissiveScroll_Direction2, _EmissiveScroll_Velocity2, _EmissiveScroll_Interval2, _EmissiveScroll_Width2, _EmissionScrollingOffset2, pos2); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled2) + { + emissionStrength2 *= calculateBlinkingEmission(_EmissiveBlink_Min2, _EmissiveBlink_Max2, _EmissiveBlink_Velocity2, _EmissionBlinkingOffset2); + } + + emissionColor2 = hueShift(emissionColor2, frac(_EmissionHueShift2 + _EmissionHueShiftSpeed2 * _Time.x) * _EmissionHueShiftEnabled2); + #if defined(PROP_EMISSIONMASK2) || !defined(OPTIMIZER_ENABLED) + float emissionMask2 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask2, _MainTex, poiUV(poiMesh.uv[_EmissionMask2UV], _EmissionMask2_ST) + _Time.x * _EmissionMask2Pan); + #else + float emissionMask2 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask2 *= blackLightMask[_BlackLightMaskEmission2]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength2, _EmissionAL2StrengthMod, _EmissionAL2StrengthBand, _EmissionAL2Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength2, _AudioLinkEmission2CenterOutwidth, _AudioLinkEmission2CenterOutSize, _AudioLinkEmission2CenterOutBand, _AudioLinkEmission2CenterOut, _EmissionAL2Enabled); + emissionStrength2 *= glowInTheDarkMultiplier2 * emissionMask2; + emission2 = max(emissionStrength2 * emissionColor2, 0); + + poiFragData.emission += emission2; + return emission2 * _EmissionReplace2; + } + #endif + + #ifdef POI_EMISSION_3 + float3 applyEmission3(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam, in PoiMods poiMods) + { + + // Second Emission + float3 emission3 = 0; + float emissionStrength3 = 0; + float3 emissionColor3 = 0; + + emissionStrength3 = _EmissionStrength3; + + float glowInTheDarkMultiplier3 = calculateGlowInTheDark(_GITDEMinLight3, _GITDEMaxLight3, _GITDEMinEmissionMultiplier3, _GITDEMaxEmissionMultiplier3, _EnableGITDEmission3, _GITDEWorldOrMesh3, poiLight); + #if defined(PROP_EMISSIONMAP3) || !defined(OPTIMIZER_ENABLED) + + //UNITY_BRANCH + if (!_EmissionCenterOutEnabled3) + { + emissionColor3 = POI2D_SAMPLER_PAN(_EmissionMap3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionMap3_ST), _EmissionMap3Pan) * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + else + { + emissionColor3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap3, _MainTex, ((.5 + poiLight.nDotV * .5) * _EmissionMap3_ST.xy) + _Time.x * _EmissionCenterOutSpeed3).rgb * lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + } + #else + emissionColor3 = lerp(1, poiFragData.baseColor, _EmissionBaseColorAsMap3).rgb * poiThemeColor(poiMods, _EmissionColor3.rgb, _EmissionColor3ThemeIndex); + #endif + //UNITY_BRANCH + if (_ScrollingEmission3) + { + float3 pos3 = poiMesh.localPos; + //UNITY_BRANCH + if (_EmissionScrollingVertexColor3) + { + pos3 = poiMesh.vertexColor.rgb; + } + + //UNITY_BRANCH + if (_EmissionScrollingUseCurve3) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE3) || !defined(OPTIMIZER_ENABLED) + emissionStrength3 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve3, _MainTex, poiUV(poiMesh.uv[_EmissionMap3UV], _EmissionScrollingCurve3_ST) + (dot(pos3, _EmissiveScroll_Direction3) * _EmissiveScroll_Interval3) + _Time.x * _EmissiveScroll_Velocity3); + #endif + } + else + { + emissionStrength3 *= calculateScrollingEmission(_EmissiveScroll_Direction3, _EmissiveScroll_Velocity3, _EmissiveScroll_Interval3, _EmissiveScroll_Width3, _EmissionScrollingOffset3, pos3); + } + } + //UNITY_BRANCH + if (_EmissionBlinkingEnabled3) + { + emissionStrength3 *= calculateBlinkingEmission(_EmissiveBlink_Min3, _EmissiveBlink_Max3, _EmissiveBlink_Velocity3, _EmissionBlinkingOffset3); + } + + emissionColor3 = hueShift(emissionColor3, frac(_EmissionHueShift3 + _EmissionHueShiftSpeed3 * _Time.x) * _EmissionHueShiftEnabled3); + #if defined(PROP_EMISSIONMASK3) || !defined(OPTIMIZER_ENABLED) + float emissionMask3 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask3, _MainTex, poiUV(poiMesh.uv[_EmissionMask3UV], _EmissionMask3_ST) + _Time.x * _EmissionMask3Pan); + #else + float emissionMask3 = 1; + #endif + + // #ifdef POI_BLACKLIGHT + // if (_BlackLightMaskEmission3 != 4) + // { + // emissionMask3 *= blackLightMask[_BlackLightMaskEmission3]; + // } + // #endif + applyALEmmissionStrength(poiMods, emissionStrength3, _EmissionAL3StrengthMod, _EmissionAL3StrengthBand, _EmissionAL3Enabled); + applyALCenterOutEmission(poiMods, poiLight.nDotV, emissionStrength3, _AudioLinkEmission3CenterOutwidth, _AudioLinkEmission3CenterOutSize, _AudioLinkEmission3CenterOutBand, _AudioLinkEmission3CenterOut, _EmissionAL3Enabled); + emissionStrength3 *= glowInTheDarkMultiplier3 * emissionMask3; + emission3 = max(emissionStrength3 * emissionColor3, 0); + + poiFragData.emission += emission3; + return emission3 * _EmissionReplace3; + } + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + /* + #ifdef + , out float depth : SV_DEPTH + #endif + */ + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + float3 emissionBaseReplace = 0; + #endif + + #ifdef _EMISSION + emissionBaseReplace += applyEmission(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_1 + emissionBaseReplace += applyEmission1(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_2 + emissionBaseReplace += applyEmission2(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + #ifdef POI_EMISSION_3 + emissionBaseReplace += applyEmission3(poiFragData, poiMesh, poiLight, poiCam, poiMods); + #endif + + #if defined(_EMISSION) || defined(POI_EMISSION_1) || defined(POI_EMISSION_2) || defined(POI_EMISSION_3) + poiFragData.finalColor.rgb = lerp(poiFragData.finalColor.rgb, saturate(emissionBaseReplace), poiMax(emissionBaseReplace)); + #endif + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha; + + ApplyAlphaToCoverage(poiFragData, poiMesh); + + applyDithering(poiFragData, poiCam); + + #ifdef UNITY_PASS_FORWARDBASE + poiFragData.emission = max(poiFragData.emission * _PPEmissionMultiplier, 0); + poiFragData.finalColor = max(poiFragData.finalColor * _PPFinalColorMultiplier, 0); + #endif + + #ifdef MOCHIE_POSTPROCESS + applyPostProcessing(poiFragData, poiMesh); + #endif + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ForwardAdd" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite Off + Cull [_Cull] + AlphaToMask [_AlphaToCoverage] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_instancing + #pragma multi_compile_fog + #define POI_PASS_ADD + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + float4 _GlobalThemeColor0; + float4 _GlobalThemeColor1; + float4 _GlobalThemeColor2; + float4 _GlobalThemeColor3; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingAOMaps; + #endif + float4 _LightingAOMaps_ST; + float2 _LightingAOMapsPan; + float _LightingAOMapsUV; + float _LightDataAOStrengthR; + float _LightDataAOStrengthG; + float _LightDataAOStrengthB; + float _LightDataAOStrengthA; + + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingDetailShadowMaps; + #endif + float4 _LightingDetailShadowMaps_ST; + float2 _LightingDetailShadowMapsPan; + float _LightingDetailShadowMapsUV; + float _LightingDetailShadowStrengthR; + float _LightingDetailShadowStrengthG; + float _LightingDetailShadowStrengthB; + float _LightingDetailShadowStrengthA; + + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + Texture2D _LightingShadowMasks; + #endif + float4 _LightingShadowMasks_ST; + float2 _LightingShadowMasksPan; + float _LightingShadowMasksUV; + float _LightingShadowMaskStrengthR; + float _LightingShadowMaskStrengthG; + float _LightingShadowMaskStrengthB; + float _LightingShadowMaskStrengthA; + + // Lighting Data + float _Unlit_Intensity; + float _LightingColorMode; + float _LightingMapMode; + float _LightingDirectionMode; + float3 _LightngForcedDirection; + float _LightingIndirectUsesNormals; + float _LightingCapEnabled; + float _LightingCap; + float _LightingForceColorEnabled; + float3 _LightingForcedColor; + float _LightingForcedColorThemeIndex; + float _LightingCastedShadows; + float _LightingMonochromatic; + float _LightingAdditiveMonochromatic; + float _LightingMinLightBrightness; + // Additive Lighting Data + float _LightingAdditiveLimited; + float _LightingAdditiveLimit; + float _LightingAdditivePassthrough; + // Lighting Data Debug + float _LightingDebugVisualize; + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailMask; + #endif + float4 _DetailMask_ST; + float2 _DetailMaskPan; + float _DetailMaskUV; + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailNormalMap; + #endif + float4 _DetailNormalMap_ST; + float2 _DetailNormalMapPan; + float _DetailNormalMapUV; + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _DetailTex; + #endif + float4 _DetailTex_ST; + float2 _DetailTexPan; + float _DetailTexUV; + + float3 _DetailTint; + float _DetailTintThemeIndex; + float _DetailTexIntensity; + float _DetailBrightness; + float _DetailNormalMapScale; + #endif + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef VIGNETTE + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RGBMask; + #endif + float4 _RGBMask_ST; + float2 _RGBMaskPan; + float _RGBMaskUV; + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RedTexure; + #endif + float4 _RedTexure_ST; + float2 _RedTexurePan; + float _RedTexureUV; + + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GreenTexture; + #endif + float4 _GreenTexture_ST; + float2 _GreenTexturePan; + float _GreenTextureUV; + + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BlueTexture; + #endif + float4 _BlueTexture_ST; + float2 _BlueTexturePan; + float _BlueTextureUV; + + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _AlphaTexture; + #endif + float4 _AlphaTexture_ST; + float2 _AlphaTexturePan; + float _AlphaTextureUV; + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalR; + float4 _RgbNormalR_ST; + float2 _RgbNormalRPan; + float _RgbNormalRUV; + float _RgbNormalRScale; + + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalG; + float4 _RgbNormalG_ST; + float2 _RgbNormalGPan; + float _RgbNormalGUV; + float _RgbNormalGScale; + + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalB; + float4 _RgbNormalB_ST; + float2 _RgbNormalBPan; + float _RgbNormalBUV; + float _RgbNormalBScale; + + #if defined(PROP_RGBNORMALA) || !defined(OPTIMIZER_ENABLED) + #endif + Texture2D _RgbNormalA; + float4 _RgbNormalA_ST; + float2 _RgbNormalAPan; + float _RgbNormalAUV; + float _RgbNormalAScale; + + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + float4 _AlphaColor; + + float _RedColorThemeIndex; + float _GreenColorThemeIndex; + float _BlueColorThemeIndex; + float _AlphaColorThemeIndex; + + float _RGBBlendMultiplicative; + float _RGBUseVertexColors; + float _RGBNormalBlend; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + Texture2D _DecalMask; + float4 _DecalMask_ST; + float2 _DecalMaskPan; + float _DecalMaskUV; + + #ifdef COLOR_GRADING_LOG_VIEW + // Audio Link + half _AudioLinkDecal0ScaleBand; + float4 _AudioLinkDecal0Scale; + half _AudioLinkDecal0RotationBand; + float2 _AudioLinkDecal0Rotation; + half _AudioLinkDecal0AlphaBand; + float2 _AudioLinkDecal0Alpha; + half _AudioLinkDecal0EmissionBand; + float2 _AudioLinkDecal0Emission; + + half _AudioLinkDecal1ScaleBand; + float4 _AudioLinkDecal1Scale; + half _AudioLinkDecal1RotationBand; + float2 _AudioLinkDecal1Rotation; + half _AudioLinkDecal1AlphaBand; + float2 _AudioLinkDecal1Alpha; + half _AudioLinkDecal1EmissionBand; + float2 _AudioLinkDecal1Emission; + + half _AudioLinkDecal2ScaleBand; + float4 _AudioLinkDecal2Scale; + half _AudioLinkDecal2RotationBand; + float2 _AudioLinkDecal2Rotation; + half _AudioLinkDecal2AlphaBand; + float2 _AudioLinkDecal2Alpha; + half _AudioLinkDecal2EmissionBand; + float2 _AudioLinkDecal2Emission; + + half _AudioLinkDecal3ScaleBand; + float4 _AudioLinkDecal3Scale; + half _AudioLinkDecal3RotationBand; + float2 _AudioLinkDecal3Rotation; + half _AudioLinkDecal3AlphaBand; + float2 _AudioLinkDecal3Alpha; + half _AudioLinkDecal3EmissionBand; + float2 _AudioLinkDecal3Emission; + float _AudioLinkDecalX; + float _AudioLinkDecal3SideBand; + float4 _AudioLinkDecal3SideMin; + float4 _AudioLinkDecal3SideMax; + #endif + + #ifdef GEOM_TYPE_BRANCH + float _Decal0MaskChannel; + sampler2D _DecalTexture; + float4 _DecalTexture_ST; + float2 _DecalTexturePan; + float _DecalTextureUV; + + float4 _DecalColor; + float _DecalColorThemeIndex; + fixed _DecalTiled; + float _DecalBlendType; + half _DecalRotation; + half2 _DecalScale; + float4 _DecalSideOffset; + half2 _DecalPosition; + half _DecalRotationSpeed; + float _DecalEmissionStrength; + float _DecalBlendAlpha; + float _DecalOverideAlpha; + float _DecalHueShiftEnabled; + float _DecalHueShift; + float _DecalHueShiftSpeed; + float _Decal0Depth; + float _Decal0HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_BRANCH_DETAIL + float _Decal1MaskChannel; + sampler2D _DecalTexture1; + float4 _DecalTexture1_ST; + float2 _DecalTexture1Pan; + float _DecalTexture1UV; + + float4 _DecalColor1; + float _DecalColor1ThemeIndex; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + float4 _DecalSideOffset1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalOverideAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; + float _Decal1Depth; + float _Decal1HueAngleStrength; + #endif + + #ifdef GEOM_TYPE_FROND + float _Decal2MaskChannel; + sampler2D _DecalTexture2; + float4 _DecalTexture2_ST; + float2 _DecalTexture2Pan; + float _DecalTexture2UV; + float4 _DecalColor2; + float _DecalColor2ThemeIndex; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + float4 _DecalSideOffset2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalOverideAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; + float _Decal2Depth; + float _Decal2HueAngleStrength; + #endif + + #ifdef DEPTH_OF_FIELD_COC_VIEW + float _Decal3MaskChannel; + sampler2D _DecalTexture3; + float4 _DecalTexture3_ST; + float2 _DecalTexture3Pan; + float _DecalTexture3UV; + float4 _DecalColor3; + float _DecalColor3ThemeIndex; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + float4 _DecalSideOffset3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalOverideAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; + float _Decal3Depth; + float _Decal3HueAngleStrength; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + // Toon Lighting + UNITY_DECLARE_TEX2D(_ToonRamp); + float _ShadowOffset; + float _ShadowStrength; + float _LightingIgnoreAmbientColor; + // Math Toon Lighting + float _LightingGradientStart; + float _LightingGradientEnd; + float3 _LightingShadowColor; + float _LightingGradientStartWrap; + float _LightingGradientEndWrap; + // ShadeMap Lighting + float3 _1st_ShadeColor; + Texture2D _1st_ShadeMap; + float4 _1st_ShadeMap_ST; + float2 _1st_ShadeMapPan; + float _1st_ShadeMapUV; + float _Use_1stShadeMapAlpha_As_ShadowMask; + float _1stShadeMapMask_Inverse; + float _Use_BaseAs1st; + float3 _2nd_ShadeColor; + Texture2D _2nd_ShadeMap; + float4 _2nd_ShadeMap_ST; + float2 _2nd_ShadeMapPan; + float _2nd_ShadeMapUV; + float _Use_2ndShadeMapAlpha_As_ShadowMask; + float _2ndShadeMapMask_Inverse; + float _Use_1stAs2nd; + float _BaseColor_Step; + float _BaseShade_Feather; + float _ShadeColor_Step; + float _1st2nd_Shades_Feather; + float _ShadingShadeMapBlendType; + // Realistic Lighting + float _LightingStandardSmoothness; + // Skin + sampler2D _SkinLUT; + float _SssScale; + float _SssBumpBlur; + float3 _SssTransmissionAbsorption; + float3 _SssColorBleedAoWeights; + + // Cloth + #ifdef _LIGHTINGMODE_CLOTH + Texture2D_float _ClothDFG; + SamplerState sampler_ClothDFG; + + #if defined(PROP_CLOTHMETALLICSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClothMetallicSmoothnessMap; + #endif + + float4 _ClothMetallicSmoothnessMap_ST; + float2 _ClothMetallicSmoothnessMapPan; + float _ClothMetallicSmoothnessMapUV; + float _ClothMetallicSmoothnessMapInvert; + + float _ClothMetallic; + float _ClothReflectance; + float _ClothSmoothness; + #endif + + // Additive + float _LightingAdditiveType; + float _LightingAdditiveGradientStart; + float _LightingAdditiveGradientEnd; + float _LightingAdditiveDetailStrength; + float _LightingAdditiveLimitIntensity; + float _LightingAdditiveMaxIntensity; + + #ifdef POI_MATCAP0 + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap; + float4 _Matcap_ST; + float2 _MatcapPan; + float _MatcapUV; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _MatcapMask; + float4 _MatcapMask_ST; + float2 _MatcapMaskPan; + float _MatcapMaskUV; + #endif + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap0NormalMap; + #endif + float4 _Matcap0NormalMap_ST; + float2 _Matcap0NormalMapPan; + float _Matcap0NormalMapUV; + float _Matcap0NormalMapScale; + #endif + float _MatcapUVMode; + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapColorThemeIndex; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapAlphaOverride; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + #endif + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2; + float4 _Matcap2_ST; + float2 _Matcap2Pan; + float _Matcap2UV; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap2Mask; + float4 _Matcap2Mask_ST; + float2 _Matcap2MaskPan; + float _Matcap2MaskUV; + #endif + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _Matcap1NormalMap; + #endif + float4 _Matcap1NormalMap_ST; + float2 _Matcap1NormalMapPan; + float _Matcap1NormalMapUV; + float _Matcap1NormalMapScale; + #endif + float _Matcap2UVMode; + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2ColorThemeIndex; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2AlphaOverride; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + #ifdef _CUBEMAP + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _CubeMap; + #endif + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _CubeMapMask; + float4 _CubeMapMask_ST; + float2 _CubeMapMaskPan; + float _CubeMapMaskUV; + #endif + float _CubeMapUVMode; + float _CubeMapMaskInvert; + float4 _CubeMapColor; + float _CubeMapColorThemeIndex; + float _CubeMapIntensity; + float _CubeMapReplace; + float _CubeMapMultiply; + float _CubeMapAdd; + float _CubeMapEnable; + float _CubeMapLightMask; + float _CubeMapEmissionStrength; + float _CubeMapNormal; + float _CubeMapHueShiftEnabled; + float _CubeMapHueShiftSpeed; + float _CubeMapHueShift; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + float _RimWidthNoiseStrength; + float _RimLightColorThemeIndex; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimTex; + #endif + float4 _RimTex_ST; + float2 _RimTexPan; + float _RimTexUV; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimMask; + #endif + float4 _RimMask_ST; + float2 _RimMaskPan; + float _RimMaskUV; + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimWidthNoiseTexture; + #endif + float4 _RimWidthNoiseTexture_ST; + float2 _RimWidthNoiseTexturePan; + float _RimWidthNoiseTextureUV; + + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_SIMPLE + float _GlitterUV; + half3 _GlitterColor; + float _GlitterColorThemeIndex; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterTextureRotation; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + float _GlitterRandomSize; + float4 _GlitterMinMaxSize; + float _GlitterRandomRotation; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterMask; + #endif + float4 _GlitterMask_ST; + float2 _GlitterMaskPan; + float _GlitterMaskUV; + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterColorMap; + #endif + float4 _GlitterColorMap_ST; + float2 _GlitterColorMapPan; + float _GlitterColorMapUV; + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _GlitterTexture; + #endif + float4 _GlitterTexture_ST; + float2 _GlitterTexturePan; + float _GlitterTextureUV; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef MOCHIE_PBR + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + Texture2D _MochieMetallicMaps; + #endif + float4 _MochieMetallicMaps_ST; + float2 _MochieMetallicMapsPan; + float _MochieMetallicMapsUV; + float _MochieMetallicMapInvert; + float _MochieRoughnessMapInvert; + float _MochieReflectionMaskInvert; + float _MochieSpecularMaskInvert; + + float _MochieReflectionTintThemeIndex; + float _MochieSpecularTintThemeIndex; + + float _MochieRoughnessMultiplier; + float _MochieMetallicMultiplier; + float _MochieReflectionStrength; + float _MochieSpecularStrength; + float4 _MochieSpecularTint; + float4 _MochieReflectionTint; + float _MochieLitFallback; + + samplerCUBE _MochieReflCube; + float4 _MochieReflCube_HDR; + float _MochieForceFallback; + + #endif + + #ifdef _COLORCOLOR_ON + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatMask; + #endif + float4 _ClearCoatMask_ST; + float2 _ClearCoatMaskPan; + float _ClearCoatMaskUV; + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _ClearCoatSmoothnessMap; + #endif + float _ClearCoatNormal; + float4 _ClearCoatSmoothnessMap_ST; + float2 _ClearCoatSmoothnessMapPan; + float _ClearCoatSmoothnessMapUV; + float _ClearCoatInvertSmoothness; + float _ClearCoat; + float _ClearCoatSmoothness; + float3 _ClearCoatTint; + float _ClearCoatTintThemeIndex; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + #endif + + #ifdef POI_ENVIRORIM + + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _RimEnviroMask; + #endif + float4 _RimEnviroMask_ST; + float2 _RimEnviroMaskPan; + float _RimEnviroMaskUV; + + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + Texture2D _HighColor_Tex; + #endif + float4 _HighColor_Tex_ST; + float2 _HighColor_TexPan; + float _HighColor_TexUV; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Set_HighColorMask; + #endif + float4 _Set_HighColorMask_ST; + float2 _Set_HighColorMaskPan; + float _Set_HighColorMaskUV; + float _Tweak_HighColorMaskLevel; + + /* + #if defined(PROP_StylizedSpecularOPTMAP1) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap1; + #endif + float4 _StylizedSpecularOptMap1_ST; + float2 _StylizedSpecularOptMap1Pan; + float _StylizedSpecularOptMap1UV; + + #if defined(PROP_StylizedSpecularOPTMAP2) || !defined(OPTIMIZER_ENABLED) + Texture2D _StylizedSpecularOptMap2; + #endif + float4 _StylizedSpecularOptMap2_ST; + float2 _StylizedSpecularOptMap2Pan; + float _StylizedSpecularOptMap2UV; + */ + + float4 _HighColor; + float _UseLightColor; + + float _HighColor_Power; + float _StylizedSpecularFeather; + float _Layer1Strength; + + float _Layer2Size; + float _StylizedSpecular2Feather; + float _Layer2Strength; + + float _StylizedSpecularStrength; + float _UseSpecularOptMap2; + float _HighColorThemeIndex; + float _Is_BlendAddToHiColor; + float _Is_SpecularToHighColor; + #endif + + #ifdef POI_PATHING + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingMap; + SamplerState SmpRepeatPoint; + #endif + float4 _PathingMap_ST; + float2 _PathingMapPan; + float _PathingMapUV; + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _PathingColorMap; + #endif + float4 _PathingColorMap_ST; + float2 _PathingColorMapPan; + float _PathingColorMapUV; + + // Fill, 0, Path, 1, Loop, 2 + half _PathTypeR; + half _PathTypeG; + half _PathTypeB; + half3 _PathWidth; + float3 _PathTime; + float3 _PathOffset; + float3 _PathSpeed; + float4 _PathColorR; + float4 _PathColorG; + float4 _PathColorB; + float3 _PathEmissionStrength; + float3 _PathSoftness; + float3 _PathSegments; + float3 _PathAlpha; + + float _PathColorRThemeIndex; + float _PathColorGThemeIndex; + float _PathColorBThemeIndex; + + #ifdef COLOR_GRADING_LOG_VIEW + // Time Offset + half _AudioLinkPathTimeOffsetBandR; + half2 _AudioLinkPathTimeOffsetR; + half _AudioLinkPathTimeOffsetBandG; + half2 _AudioLinkPathTimeOffsetG; + half _AudioLinkPathTimeOffsetBandB; + half2 _AudioLinkPathTimeOffsetB; + + // Emission Offset + half _AudioLinkPathEmissionAddBandR; + half2 _AudioLinkPathEmissionAddR; + half _AudioLinkPathEmissionAddBandG; + half2 _AudioLinkPathEmissionAddG; + half _AudioLinkPathEmissionAddBandB; + half2 _AudioLinkPathEmissionAddB; + + // Length Offset + half _AudioLinkPathWidthOffsetBandR; + half2 _AudioLinkPathWidthOffsetR; + half _AudioLinkPathWidthOffsetBandG; + half2 _AudioLinkPathWidthOffsetG; + half _AudioLinkPathWidthOffsetBandB; + half2 _AudioLinkPathWidthOffsetB; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceRamp; + #endif + float4 _IridescenceRamp_ST; + float2 _IridescenceRampPan; + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceMask; + #endif + float4 _IridescenceMask_ST; + float2 _IridescenceMaskPan; + float _IridescenceMaskUV; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + Texture2D _IridescenceNormalMap; + #endif + float4 _IridescenceNormalMap_ST; + float2 _IridescenceNormalMapPan; + float _IridescenceNormalMapUV; + + float _IridescenceTime; + float _IridescenceIntensity; + float _IridescenceHueShiftEnabled; + float _IridescenceHueShiftSpeed; + float _IridescenceHueShift; + float2 _IridescenceAudioLinkEmission; + float _IridescenceAudioLinkEmissionBand; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceAddBlend; + float _IridescenceReplaceBlend; + float _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + #endif + + #ifdef EFFECT_BUMP + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + float4 _TextFPSColor; + float _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + float2 _TextFPSOffset; + float2 _TextFPSScale; + float _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + float _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + float2 _TextPositionOffset; + float2 _TextPositionScale; + float _TextPositionRotation; + + float4 _TextTimeColor; + float _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + float2 _TextTimeOffset; + float2 _TextTimeScale; + float _TextTimeRotation; + + float _TextFPSColorThemeIndex; + float _TextPositionColorThemeIndex; + float _TextTimeColorThemeIndex; + + float3 globalTextEmission; + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + #define glyphWidth 0.0625 + + #endif + + #ifdef MOCHIE_POSTPROCESS + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPLUT; + SamplerState sampler_PPLUT; + #endif + float4 _PPLUT_TexelSize; + float _PPLUTStrength; + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _PPMask; + #endif + float4 _PPMask_ST; + float2 _PPMaskPan; + float _PPMaskUV; + float _PPMaskInvert; + + float3 _PPTint; + float3 _PPRGB; + float _PPHue; + float _PPContrast; + float _PPSaturation; + float _PPBrightness; + float _PPLightness; + float _PPHDR; + const static float COLORS = 32; + + #endif + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + void calculateGlobalThemes(inout PoiMods poiMods) + { + poiMods.globalColorTheme[0] = _GlobalThemeColor0; + poiMods.globalColorTheme[1] = _GlobalThemeColor1; + poiMods.globalColorTheme[2] = _GlobalThemeColor2; + poiMods.globalColorTheme[3] = _GlobalThemeColor3; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + #ifdef FINALPASS + void ApplyDetailColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiUV(poiMesh.uv[_DetailTexUV], _DetailTex_ST), _DetailTexPan).rgb * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #else + half3 detailTexture = 0.21763764082 * poiThemeColor(poiMods, _DetailTint, _DetailTintThemeIndex); + #endif + + poiFragData.baseColor.rgb *= LerpWhiteTo(detailTexture * _DetailBrightness * unity_ColorSpaceDouble.rgb, poiMods.detailMask.r * _DetailTexIntensity); + } + + void ApplyDetailNormal(inout PoiMods poiMods, inout PoiMesh poiMesh) + { + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + poiMods.detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiUV(poiMesh.uv[_DetailMaskUV], _DetailMask_ST), _DetailMaskPan).rg; + #else + poiMods.detailMask = 1; + #endif + + #ifdef POI_BACKFACE + if (!poiMesh.isFrontFace) + { + poiMods.detailMask.g *= _BackFaceDetailIntensity; + } + #endif + + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiUV(poiMesh.uv[_DetailNormalMapUV], _DetailNormalMap_ST), _DetailNormalMapPan), _DetailNormalMapScale * poiMods.detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(detailNormal, poiMesh.tangentSpaceNormal); + #endif + } + #endif + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef VIGNETTE + #if defined(GEOM_TYPE_MESH) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + void calculateRGBNormals(inout PoiMesh poiMesh) + { + float4 rgbMask; + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + //UNITY_BRANCH + if (_RgbNormalsEnabled) + { + //UNITY_BRANCH + if (_RGBNormalBlend == 0) + { + //UNITY_BRANCH + if (_RgbNormalRScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + //UNITY_BRANCH + if (_RgbNormalGScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + //UNITY_BRANCH + if (_RgbNormalBScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + //UNITY_BRANCH + if (_RgbNormalAScale > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale); + poiMesh.tangentSpaceNormal = lerp(poiMesh.tangentSpaceNormal, normalToBlendWith, rgbMask.a); + } + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiUV(poiMesh.uv[_RgbNormalRUV], _RgbNormalR_ST), _RgbNormalRPan), _RgbNormalRScale * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiUV(poiMesh.uv[_RgbNormalGUV], _RgbNormalG_ST), _RgbNormalGPan), _RgbNormalGScale * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiUV(poiMesh.uv[_RgbNormalBUV], _RgbNormalB_ST), _RgbNormalBPan), _RgbNormalBScale * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalA, _MainTex, poiUV(poiMesh.uv[_RgbNormalAUV], _RgbNormalA_ST), _RgbNormalAPan), _RgbNormalAScale * rgbMask.a); + newNormal = BlendNormals(newNormal, normalToBlendWith); + poiMesh.tangentSpaceNormal = BlendNormals(newNormal, poiMesh.tangentSpaceNormal); + } + } + } + #endif + void calculateRGBMask(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + //If RGB normals are in use this data will already exist + float4 rgbMask = float4(1, 1, 1, 1); + //UNITY_BRANCH + if (_RGBUseVertexColors) + { + rgbMask = poiMesh.vertexColor; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiUV(poiMesh.uv[_RGBMaskUV], _RGBMask_ST), _RGBMaskPan); + #else + rgbMask = 1; + #endif + } + + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiUV(poiMesh.uv[_RedTexureUV], _RedTexure_ST), _RedTexurePan); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiUV(poiMesh.uv[_GreenTextureUV], _GreenTexture_ST), _GreenTexturePan); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiUV(poiMesh.uv[_BlueTextureUV], _BlueTexture_ST), _BlueTexturePan); + #else + float4 blue = 1; + #endif + #if defined(PROP_ALPHATEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 alpha = POI2D_SAMPLER_PAN(_AlphaTexture, _MainTex, poiUV(poiMesh.uv[_AlphaTextureUV], _AlphaTexture_ST), _AlphaTexturePan); + #else + float4 alpha = 1; + #endif + + //UNITY_BRANCH + if (_RGBBlendMultiplicative) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + RGBColor = lerp(RGBColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + RGBColor = lerp(RGBColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + RGBColor = lerp(RGBColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + + poiFragData.baseColor *= RGBColor; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, red.rgb * poiThemeColor(poiMods, _RedColor.rgb, _RedColorThemeIndex), rgbMask.r * red.a * _RedColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, green.rgb * poiThemeColor(poiMods, _GreenColor.rgb, _GreenColorThemeIndex), rgbMask.g * green.a * _GreenColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, blue.rgb * poiThemeColor(poiMods, _BlueColor.rgb, _BlueColorThemeIndex), rgbMask.b * blue.a * _BlueColor.a); + poiFragData.baseColor = lerp(poiFragData.baseColor, alpha.rgb * poiThemeColor(poiMods, _AlphaColor.rgb, _AlphaColorThemeIndex), rgbMask.a * alpha.a * _AlphaColor.a); + } + } + #endif + + #ifdef GEOM_TYPE_BRANCH + + float2 decalUV(float uvNumber, float4 uv_st, float2 position, half rotation, half rotationSpeed, half2 scale, float4 scaleOffset, float depth, in PoiMesh poiMesh, in PoiCam poiCam) + { + scaleOffset = float4(-scaleOffset.x, scaleOffset.y, -scaleOffset.z, scaleOffset.w); + float2 uv = poiUV(poiMesh.uv[uvNumber], uv_st) + calcParallax(depth + 1, poiCam); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position + scaleOffset.xz, scale / 2 + position + scaleOffset.yw, float2(0, 0), float2(1, 1)); + return uv; + } + + inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) + { + //UNITY_BRANCH + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; + } + + inline float applyTilingClipping(float enabled, float2 uv) + { + float ret = 1; + //UNITY_BRANCH + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; + } + + void applyDecals(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods, in PoiLight poiLight) + { + float decalAlpha = 0; + float alphaOverride = 0; + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiUV(poiMesh.uv[_DecalMaskUV], _DecalMask_ST), _DecalMaskPan); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + float decalRotation = 0; + decalScale = _DecalScale; + float2 ddxuv = 0; + float2 ddyuv = 0; + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal0Scale.xy, _AudioLinkDecal0Scale.zw, poiMods.audioLink[_AudioLinkDecal0ScaleBand]); + decalRotation += lerp(_AudioLinkDecal0Rotation.x, _AudioLinkDecal0Rotation.y, poiMods.audioLink[_AudioLinkDecal0RotationBand]); + } + #endif + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture, uv + _DecalTexturePan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #else + uv = decalUV(_DecalTextureUV, _DecalTexture_ST, _DecalPosition, _DecalRotation + decalRotation, _DecalRotationSpeed, decalScale, _DecalSideOffset, _Decal0Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor.rgb, _DecalColorThemeIndex), _DecalColor.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled, decalColor.rgb, _DecalHueShift + poiLight.nDotV * _Decal0HueAngleStrength, _DecalHueShiftSpeed); + decalColor.a *= applyTilingClipping(_DecalTiled, uv) * decalMask[_Decal0MaskChannel]; + + float audioLinkDecalAlpha0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha0 = lerp(_AudioLinkDecal0Alpha.x, _AudioLinkDecal0Alpha.y, poiMods.audioLink[_AudioLinkDecal0AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType), decalColor.a * saturate(_DecalBlendAlpha + audioLinkDecalAlpha0)); + if(_DecalOverideAlpha) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission0 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission0 = lerp(_AudioLinkDecal0Emission.x, _AudioLinkDecal0Emission.y, poiMods.audioLink[_AudioLinkDecal0EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength + audioLinkDecalEmission0, 0); + + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = _DecalScale1; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal1Scale.xy, _AudioLinkDecal1Scale.zw, poiMods.audioLink[_AudioLinkDecal1ScaleBand]); + decalRotation += lerp(_AudioLinkDecal1Rotation.x, _AudioLinkDecal1Rotation.y, poiMods.audioLink[_AudioLinkDecal1RotationBand]); + } + #endif + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture1, uv + _DecalTexture1Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #else + uv = decalUV(_DecalTexture1UV, _DecalTexture1_ST, _DecalPosition1, _DecalRotation1 + decalRotation, _DecalRotationSpeed1, decalScale, _DecalSideOffset1, _Decal1Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor1.rgb, _DecalColor1ThemeIndex), _DecalColor1.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled1, decalColor.rgb, _DecalHueShift1 + poiLight.nDotV * _Decal1HueAngleStrength, _DecalHueShiftSpeed1); + decalColor.a *= applyTilingClipping(_DecalTiled1, uv) * decalMask[_Decal1MaskChannel]; + + float audioLinkDecalAlpha1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha1 = lerp(_AudioLinkDecal1Alpha.x, _AudioLinkDecal1Alpha.y, poiMods.audioLink[_AudioLinkDecal1AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType1), decalColor.a * saturate(_DecalBlendAlpha1 + audioLinkDecalAlpha1)); + if(_DecalOverideAlpha1) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission1 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission1 = lerp(_AudioLinkDecal1Emission.x, _AudioLinkDecal1Emission.y, poiMods.audioLink[_AudioLinkDecal1EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength1 + audioLinkDecalEmission1, 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = _DecalScale2; + decalRotation = 0; + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal2Scale.xy, _AudioLinkDecal2Scale.zw, poiMods.audioLink[_AudioLinkDecal2ScaleBand]); + decalRotation += lerp(_AudioLinkDecal2Rotation.x, _AudioLinkDecal2Rotation.y, poiMods.audioLink[_AudioLinkDecal2RotationBand]); + } + #endif + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture2, uv + _DecalTexture2Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #else + uv = decalUV(_DecalTexture2UV, _DecalTexture2_ST, _DecalPosition2, _DecalRotation2 + decalRotation, _DecalRotationSpeed2, decalScale, _DecalSideOffset2, _Decal2Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor2.rgb, _DecalColor2ThemeIndex), _DecalColor2.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled2, decalColor.rgb, _DecalHueShift2 + poiLight.nDotV * _Decal2HueAngleStrength, _DecalHueShiftSpeed2); + decalColor.a *= applyTilingClipping(_DecalTiled2, uv) * decalMask[_Decal2MaskChannel]; + + float audioLinkDecalAlpha2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalAlpha2 = lerp(_AudioLinkDecal2Alpha.x, _AudioLinkDecal2Alpha.y, poiMods.audioLink[_AudioLinkDecal2AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType2), decalColor.a * saturate(_DecalBlendAlpha2 + audioLinkDecalAlpha2)); + if(_DecalOverideAlpha2) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission2 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission2 = lerp(_AudioLinkDecal2Emission.x, _AudioLinkDecal2Emission.y, poiMods.audioLink[_AudioLinkDecal2EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength2 + audioLinkDecalEmission2, 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = _DecalScale3; + decalRotation = 0; + float4 sideMod = 0; + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + decalScale += lerp(_AudioLinkDecal3Scale.xy, _AudioLinkDecal3Scale.zw, poiMods.audioLink[_AudioLinkDecal3ScaleBand]); + sideMod += lerp(_AudioLinkDecal3SideMin, _AudioLinkDecal3SideMax, poiMods.audioLink[_AudioLinkDecal3SideBand]); + decalRotation += lerp(_AudioLinkDecal3Rotation.x, _AudioLinkDecal3Rotation.y, poiMods.audioLink[_AudioLinkDecal3RotationBand]); + } + #endif + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + ddxuv = ddx(uv); + ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + decalColor = tex2D(_DecalTexture3, uv + _DecalTexture3Pan * _Time.x, ddxuv, ddyuv) * float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #else + uv = decalUV(_DecalTexture3UV, _DecalTexture3_ST, _DecalPosition3, _DecalRotation3 + decalRotation, _DecalRotationSpeed3, decalScale, _DecalSideOffset3 + sideMod, _Decal3Depth, poiMesh, poiCam); + decalColor = float4(poiThemeColor(poiMods, _DecalColor3.rgb, _DecalColor3ThemeIndex), _DecalColor3.a); + #endif + decalColor.rgb = decalHueShift(_DecalHueShiftEnabled3, decalColor.rgb, _DecalHueShift3 + poiLight.nDotV * _Decal3HueAngleStrength, _DecalHueShiftSpeed3); + decalColor.a *= applyTilingClipping(_DecalTiled3, uv) * decalMask[_Decal3MaskChannel]; + + float audioLinkDecalAlpha3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if(_AudioLinkDecalX && poiMods.audioLinkAvailable) + { + decalColor.rgb = AudioLinkLerp( ALPASS_CCSTRIP + float2( uv.x * AUDIOLINK_WIDTH, 0 ) ).rgb; + } + audioLinkDecalAlpha3 = lerp(_AudioLinkDecal3Alpha.x, _AudioLinkDecal3Alpha.y, poiMods.audioLink[_AudioLinkDecal3AlphaBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, decalColor.rgb, _DecalBlendType3), decalColor.a * saturate(_DecalBlendAlpha3 + audioLinkDecalAlpha3)); + if(_DecalOverideAlpha3) + { + alphaOverride+=1; + decalAlpha = max(decalAlpha, decalColor.a); + } + float audioLinkDecalEmission3 = 0; + #ifdef COLOR_GRADING_LOG_VIEW + audioLinkDecalEmission3 = lerp(_AudioLinkDecal3Emission.x, _AudioLinkDecal3Emission.y, poiMods.audioLink[_AudioLinkDecal3EmissionBand]) * poiMods.audioLinkAvailable; + #endif + + poiFragData.emission += decalColor.rgb * decalColor.a * max(_DecalEmissionStrength3 + audioLinkDecalEmission3, 0); + #endif + if(alphaOverride) + { + poiFragData.alpha *= decalAlpha; + } + poiFragData.baseColor = saturate(poiFragData.baseColor); + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + #ifdef VIGNETTE_MASKED + + //CLOTH + #ifdef _LIGHTINGMODE_CLOTH + #define HARD 0 + #define LERP 1 + #ifdef POI_CLOTHLERP + #define CLOTHMODE LERP + #else + #define CLOTHMODE HARD + #endif + float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) + { + // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" + float a2 = roughness * roughness; + // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function + float lambdaV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); + float lambdaL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); + float v = 0.5 / (lambdaV + lambdaL); + // a2=0 => v = 1 / 4*NoL*NoV => min=1/4, max=+inf + // a2=1 => v = 1 / 2*(NoL+NoV) => min=1/4, max=+inf + // clamp to the maximum value representable in mediump + return v; + } + + float D_GGX(float roughness, float NoH) + { + // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" + + // In mediump, there are two problems computing 1.0 - NoH^2 + // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) + // 2) NoH doesn't have enough precision around 1.0 + // Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well + + // However, we can do better using Lagrange's identity: + // ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 + // since N and H are unit vectors: ||N x H||^2 = 1.0 - NoH^2 + // This computes 1.0 - NoH^2 directly (which is close to zero in the highlights and has + // enough precision). + // Overall this yields better performance, keeping all computations in mediump + float oneMinusNoHSquared = 1.0 - NoH * NoH; + + float a = NoH * roughness; + float k = roughness / (oneMinusNoHSquared + a * a); + float d = k * k * (1.0 / UNITY_PI); + return d; + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L94-L100 + float D_Charlie(float roughness, float NoH) + { + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / roughness; + float cos2h = NoH * NoH; + float sin2h = max(1.0 - cos2h, 0.0078125); // 0.0078125 = 2^(-14/2), so sin2h^2 > 0 in fp16 + return(2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * UNITY_PI); + } + + // https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L136-L139 + float V_Neubelt(float NoV, float NoL) + { + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return 1.0 / (4.0 * (NoL + NoV - NoL * NoV)); + } + + float Distribution(float roughness, float NoH, float cloth) + { + #if CLOTHMODE == LERP + return lerp(GGXTerm(roughness, NoH), D_Charlie(roughness, NoH), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? GGXTerm(roughness, NoH) : D_Charlie(roughness, NoH); + #endif + } + + float Visibility(float roughness, float NoV, float NoL, float cloth) + { + #if CLOTHMODE == LERP + return lerp(V_SmithGGXCorrelated(roughness, NoV, NoL), V_Neubelt(NoV, NoL), cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? V_SmithGGXCorrelated(roughness, NoV, NoL) : V_Neubelt(NoV, NoL); + #endif + } + + float F_Schlick(float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + return f0 + (f90 - f0) * pow(1.0 - VoH, 5); + } + + float F_Schlick(float3 f0, float VoH) + { + float f = pow(1.0 - VoH, 5.0); + return f + f0 * (1.0 - f); + } + + float Fresnel(float3 f0, float LoH) + { + float f90 = saturate(dot(f0, float(50.0 * 0.33).xxx)); + return F_Schlick(f0, f90, LoH); + } + + float Fd_Burley(float roughness, float NoV, float NoL, float LoH) + { + // Burley 2012, "Physically-Based Shading at Disney" + float f90 = 0.5 + 2.0 * roughness * LoH * LoH; + float lightScatter = F_Schlick(1.0, f90, NoL); + float viewScatter = F_Schlick(1.0, f90, NoV); + return lightScatter * viewScatter; + } + + // Energy conserving wrap diffuse term, does *not* include the divide by pi + float Fd_Wrap(float NoL, float w) + { + return saturate((NoL + w) / pow(1.0 + w, 2)); + } + + float4 SampleDFG(float NoV, float perceptualRoughness) + { + return _ClothDFG.Sample(sampler_ClothDFG, float3(NoV, perceptualRoughness, 0)); + } + + float3 EnvBRDF(float2 dfg, float3 f0) + { + return f0 * dfg.x + dfg.y; + } + + float3 EnvBRDFMultiscatter(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(lerp(dfg.xxx, dfg.yyy, f0), f0 * dfg.z, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? lerp(dfg.xxx, dfg.yyy, f0) : f0 * dfg.z; + #endif + } + + float3 EnvBRDFEnergyCompensation(float3 dfg, float3 f0, float cloth) + { + #if CLOTHMODE == LERP + return lerp(1.0 + f0 * (1.0 / dfg.y - 1.0), 1, cloth); + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1.0 + f0 * (1.0 / dfg.y - 1.0) : 1; + #endif + } + + // + float ClothMetallic(float cloth) + { + #if CLOTHMODE == LERP + return cloth; + #elif CLOTHMODE == HARD + return cloth <= 0.5 ? 1 : 0; + #endif + } + + float3 Specular(float roughness, PoiLight poiLight, float f0, float3 normal, float cloth) + { + float NoL = poiLight.nDotLSaturated; + float NoH = poiLight.nDotH; + float LoH = poiLight.lDotH; + float NoV = poiLight.nDotV; + + float D = Distribution(roughness, NoH, cloth); + float V = Visibility(roughness, NoV, NoL, cloth); + float3 F = Fresnel(f0, LoH); + + return(D * V) * F; + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + + return direction; + } + + float SpecularAO(float NoV, float ao, float roughness) + { + return clamp(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao, 0.0, 1.0); + } + + float3 IndirectSpecular(float3 dfg, float roughness, float occlusion, float energyCompensation, float cloth, float3 indirectDiffuse, float f0, PoiLight poiLight, PoiFragData poiFragData, PoiCam poiCam, PoiMesh poiMesh) + { + float3 normal = poiMesh.normals[1]; + + float3 reflDir = reflect(-poiCam.viewDir, normal); + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz); + + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float3 indirectSpecular = probe0; + + #if UNITY_SPECCUBE_BLENDING + UNITY_BRANCH + if (unity_SpecCube0_BoxMin.w < 0.99999) + { + envData.reflUVW = getBoxProjection(reflDir, poiMesh.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube1_HDR, envData); + indirectSpecular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); + } + #endif + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular = indirectSpecular * horizon * horizon * energyCompensation * EnvBRDFMultiscatter(dfg, f0, cloth); + + indirectSpecular *= SpecularAO(poiLight.nDotV, occlusion, roughness); + return indirectSpecular; + }; + #undef LERP + #undef HARD + #undef CLOTHMODE + #endif + // CLOTH END + float _LightingWrappedWrap; + float _LightingWrappedNormalization; + // Green’s model with adjustable energy + // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ + // Modified for adjustable conservation ratio and over-wrap to directionless + float RTWrapFunc(in float dt, in float w, in float norm) + { + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; + } + + float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + + { + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); + } + float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + + { + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; + } + float3 ShadeSH9_wrapped(float3 normal, float wrap) + { + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), _LightingWrappedNormalization); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; + } + + float3 GetSHDirectionL1() + { + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); + } + // Returns the value from SH in the lighting direction with the + // brightest intensity. + half3 GetSHMaxL1() + { + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); + } + + void applyShadeMapping(inout PoiFragData poiFragData, PoiMesh poiMesh, inout PoiLight poiLight) + { + float MainColorFeatherStep = _BaseColor_Step - _BaseShade_Feather; + float firstColorFeatherStep = _ShadeColor_Step - _1st2nd_Shades_Feather; + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiUV(poiMesh.uv[_1st_ShadeMapUV], _1st_ShadeMap_ST), _1st_ShadeMapPan); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, float4(poiFragData.baseColor, 1), _Use_BaseAs1st); + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiUV(poiMesh.uv[_2nd_ShadeMapUV], _2nd_ShadeMap_ST), _2nd_ShadeMapPan); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, _Use_1stAs2nd); + + firstShadeMap.rgb *= _1st_ShadeColor.rgb; //* lighColor + secondShadeMap.rgb *= _2nd_ShadeColor.rgb; //* LightColor; + + float shadowMask = 1; + shadowMask *= _Use_1stShadeMapAlpha_As_ShadowMask ?(_1stShadeMapMask_Inverse ?(1.0 - firstShadeMap.a) : firstShadeMap.a) : 1; + shadowMask *= _Use_2ndShadeMapAlpha_As_ShadowMask ?(_2ndShadeMapMask_Inverse ?(1.0 - secondShadeMap.a) : secondShadeMap.a) : 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (_BaseColor_Step - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (_ShadeColor_Step - firstColorFeatherStep) * (shadowMask)); + + mainShadowMask *= poiLight.shadowMask * _ShadowStrength; + firstSecondShadowMask *= poiLight.shadowMask * _ShadowStrength; + + // 0 lerp | 1 multiply + if (_ShadingShadeMapBlendType == 0) + { + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + else + { + poiFragData.baseColor.rgb *= lerp(1, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + poiLight.rampedLightMap = 1 - mainShadowMask; + } + + void ApplySubtractiveLighting(inout UnityIndirect indirectLight) + { + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, _AttenuationMultiplier)); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif + } + + UnityIndirect CreateIndirectLight(in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight) + { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, poiMesh.normals[1] + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, poiMesh.normals[1] + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(poiMesh.normals[1], 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(poiMesh.normals[1], 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - _LightingStandardSmoothness; + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + //UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + indirectLight.diffuse *= poiLight.occlusion; + indirectLight.specular *= poiLight.occlusion; + + return indirectLight; + } + + void calculateShading(inout PoiLight poiLight, inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + #ifdef UNITY_PASS_FORWARDBASE + + float shadowStrength = _ShadowStrength * poiLight.shadowMask; + + #ifdef POI_PASS_OUTLINE + shadowStrength = lerp(0, shadowStrength, _OutlineShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_FLAT + poiLight.finalLighting = poiLight.directColor; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + #endif + + #ifdef _LIGHTINGMODE_TEXTURERAMP + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength); + poiLight.finalLighting = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.rampedLightMap * poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion, poiLight.directColor, poiLight.rampedLightMap); + #endif + + #ifdef _LIGHTINGMODE_MATHRAMP + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + + poiLight.finalLighting = lerp((_LightingShadowColor * lerp(poiLight.indirectColor, poiLight.directColor, _LightingIgnoreAmbientColor) * poiLight.occlusion), (poiLight.directColor), saturate(poiLight.rampedLightMap + 1 - shadowStrength)); + #endif + + #ifdef _LIGHTINGMODE_SHADEMAP + poiLight.finalLighting = poiLight.directColor; + #endif + + #ifdef _LIGHTINGMODE_REALISTIC + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, poiLight.attenuationStrength) * poiLight.detailShadow); + light.ndotl = poiLight.nDotLSaturated; + poiLight.rampedLightMap = poiLight.nDotLSaturated; + poiLight.finalLighting = UNITY_BRDF_PBS(1, 0, 0, _LightingStandardSmoothness, poiMesh.normals[1], poiCam.viewDir, light, CreateIndirectLight(poiMesh, poiCam, poiLight)).xyz; + #endif + + #ifdef _LIGHTINGMODE_CLOTH + + #if defined(PROP_MOCHIEMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 clothmapsample = POI2D_MAINTEX_SAMPLER_PAN_INLINED(_ClothMetallicSmoothnessMap, poiMesh); + float roughness = 1 - (clothmapsample.a * _ClothSmoothness); + float reflectance = _ClothReflectance * clothmapsample.b; + float clothmask = clothmapsample.g; + float metallic = pow(clothmapsample.r * _ClothMetallic, 2) * ClothMetallic(clothmask); + roughness = _ClothMetallicSmoothnessMapInvert == 1 ? 1 - roughness : roughness; + #else + float roughness = 1 - (_ClothSmoothness); + float metallic = pow(_ClothMetallic, 2); + float reflectance = _ClothReflectance; + float clothmask = 1; + #endif + + float perceptualRoughness = pow(roughness, 2); + float clampedRoughness = max(0.002, perceptualRoughness); + + float f0 = 0.16 * reflectance * reflectance * (1 - metallic) + poiFragData.baseColor * metallic; + float3 fresnel = Fresnel(f0, poiLight.nDotV); + + float3 dfg = SampleDFG(poiLight.nDotV, perceptualRoughness); + + float energyCompensation = EnvBRDFEnergyCompensation(dfg, f0, clothmask); + + poiLight.finalLighting = Fd_Burley(perceptualRoughness, poiLight.nDotV, poiLight.nDotLSaturated, poiLight.lDotH); + poiLight.finalLighting *= _LightColor0 * poiLight.attenuation * poiLight.nDotLSaturated; + float3 specular = max(0, Specular(clampedRoughness, poiLight, f0, poiMesh.normals[1], clothmask) * poiLight.finalLighting * energyCompensation * UNITY_PI); // (D * V) * F + + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + float3 indirectDiffuse; + indirectDiffuse.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, poiMesh.normals[1]); + indirectDiffuse.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, poiMesh.normals[1]); + indirectDiffuse.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, poiMesh.normals[1]); + indirectDiffuse = max(0, indirectDiffuse); + + float3 indirectSpecular = IndirectSpecular(dfg, roughness, poiLight.occlusion, energyCompensation, clothmask, indirectDiffuse, f0, poiLight, poiFragData, poiCam, poiMesh); + poiLight.finalLightAdd = specular + indirectSpecular; + poiLight.finalLighting += indirectDiffuse * poiLight.occlusion; + + poiFragData.baseColor.xyz *= (1 - metallic); + #endif + + #ifdef _LIGHTINGMODE_WRAPPED + #define grayscale_vector float3(0.3, 0.59, 0.11) + float wrap = _LightingWrappedWrap; + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, _LightingWrappedNormalization)); + float directatten = poiLight.attenuation; + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[1], wrap); + envlight *= poiLight.occlusion; + + poiLight.directColor = directcolor * poiLight.detailShadow * directatten; + poiLight.indirectColor = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directColor, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectColor, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + poiLight.rampedLightMap = saturate((poiLight.lightMap - _LightingGradientStart) / saturate(_LightingGradientEnd - _LightingGradientStart + fwidth(poiLight.lightMap))); + // poiLight.rampedLightMap = 1; + // UNITY_BRANCH + // if (_LightingRampType == 0) // Ramp Texture + // { + // poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + _ShadowOffset).rgb, shadowStrength.r); + // } + // else if (_LightingRampType == 1) // Math Gradient + // { + poiLight.rampedLightMap = lerp(_LightingShadowColor * lerp(poiLight.indirectColor, 1, _LightingIgnoreAmbientColor), float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStartWrap - .000001, _LightingGradientEndWrap, 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + // } + + poiLight.finalLighting = (poiLight.indirectColor + poiLight.directColor) * saturate(poiLight.rampedLightMap + 1 - _ShadowStrength); + #endif + + #ifdef _LIGHTINGMODE_SKIN + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + poiLight.rampedLightMap = poiLight.nDotLSaturated; + // Scattering mask. + float subsurface = 1; + float skinScattering = saturate(subsurface * _SssScale * 2); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * _SssTransmissionAbsorption.rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(poiFragData.baseColor * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, _SssBumpBlur)); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.directColor, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + poiLight.finalLighting = min(lerp(poiLight.indirectColor * _LightingShadowColor, _LightingShadowColor, _LightingIgnoreAmbientColor) + (sss * poiLight.directColor), poiLight.directColor); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingAdditiveType == 0) // Realistic + + { + poiLight.finalLighting = poiLight.directColor * poiLight.attenuation * max(0, poiLight.nDotL) * poiLight.detailShadow * poiLight.additiveShadow; + } + else if (_LightingAdditiveType == 1) // Toon + + { + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + float passthrough = 0; + #else + float passthrough = _LightingAdditivePassthrough; + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.additiveShadow, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * poiLight.detailShadow; + #else + poiLight.finalLighting = lerp(poiLight.directColor * max(poiLight.attenuation, passthrough), poiLight.indirectColor, smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, 1 - (.5 * poiLight.nDotL + .5))) * poiLight.detailShadow; + #endif + } + /* + else //if(_LightingAdditiveType == 2) // Wrapped + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, _LightingWrappedWrap, _LightingWrappedNormalization)) * detailShadow; + + poiLight.rampedLightMap = 1; + //UNITY_BRANCH + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + _ShadowOffset, 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, _LightingAdditivePassthrough); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + */ + #endif + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float3 vertexLighting = float3(0, 0, 0); + for (int index = 0; index < 4; index++) + { + //UNITY_BRANCH + if (_LightingAdditiveType == 0) + { + vertexLighting += poiLight.vColor[index] * poiLight.vAttenuationDotNL[index] * poiLight.detailShadow; // Realistic + + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 1) // Toon + + { + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + } + + //UNITY_BRANCH + if (_LightingAdditiveType == 2) //if(_LightingAdditiveType == 2) // Wrapped + + { + //TODO wrapped vertex lighting + vertexLighting += lerp(poiLight.vColor[index] * poiLight.vAttenuation[index], poiLight.vColor[index] * _LightingAdditivePassthrough * poiLight.vAttenuation[index], smoothstep(_LightingAdditiveGradientStart, _LightingAdditiveGradientEnd, poiLight.vDotNL[index])) * poiLight.detailShadow; + /* + float uv = saturate(RTWrapFunc(-poiLight.vDotNL[index], _LightingWrappedWrap, _LightingWrappedNormalization)) * poiLight.detailShadow; + + poiLight.rampedLightMap = 1; + if (_LightingRampType == 1) // Math Gradient + poiLight.rampedLightMap = lerp(_LightingShadowColor, float3(1, 1, 1), saturate(1 - smoothstep(_LightingGradientStart - .000001, _LightingGradientEnd, 1 - uv))); + + vertexLighting += poiLight.vColor[index] * poiLight.rampedLightMap * saturate(poiLight.vAttenuation[index] * uv); + */ + } + } + float3 mixedLight = poiLight.finalLighting; + poiLight.finalLighting = vertexLighting + poiLight.finalLighting; + #endif + } + #endif + + void blendMatcap(in PoiLight poiLight, inout PoiFragData poiFragData, float add, float multiply, float replace, float4 matcapColor, float matcapMask, float emissionStrength, float matcapLightMask + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + if (matcapLightMask) + { + //todo ramped lightmap is hecked + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #ifdef POI_BLACKLIGHT + if (blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + poiFragData.baseColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + poiFragData.baseColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + poiFragData.emission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + void applyMatcap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + float2 matcapUV = 0; + + // Matcap 1 + #ifdef POI_MATCAP0 + float3 normal0 = poiMesh.normals[_MatcapNormal]; + #ifdef POI_MATCAP0_CUSTOM_NORMAL + #if defined(PROP_MATCAP0NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal0 = calculateNormal(poiMesh.normals[_MatcapNormal], poiMesh, _Matcap0NormalMap, _Matcap0NormalMap_ST, _Matcap0NormalMapPan, _Matcap0NormalMapUV, _Matcap0NormalMapScale); + #endif + #endif + + switch(_MatcapUVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal0, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _MatcapBorder + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal0), dot(worldViewUp, normal0)) * _MatcapBorder + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal0); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _MatcapBorder + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #else + matcap = float4(poiThemeColor(poiMods, _MatcapColor.rgb, _MatcapColorThemeIndex), _MatcapColor.a); + #endif + + matcap.rgb *= _MatcapIntensity; + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiUV(poiMesh.uv[_MatcapMaskUV], _MatcapMask_ST), _MatcapMaskPan); + #else + matcapMask = 1; + #endif + + if (_MatcapMaskInvert) + { + matcapMask = 1 - matcapMask; + } + + poiFragData.alpha *= lerp(1, matcap.a, matcapMask * _MatcapAlphaOverride); + + //UNITY_BRANCH + if (_MatcapHueShiftEnabled) + { + matcap.rgb = hueShift(matcap.rgb, _MatcapHueShift + _Time.x * _MatcapHueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _MatcapAdd, _MatcapMultiply, _MatcapReplace, matcap, matcapMask, _MatcapEmissionStrength, _MatcapLightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap + #endif + ); + #endif + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + + float3 normal1 = poiMesh.normals[_Matcap2Normal]; + #ifdef POI_MATCAP1_CUSTOM_NORMAL + #if defined(PROP_MATCAP1NORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal1 = calculateNormal(poiMesh.normals[_Matcap2Normal], poiMesh, _Matcap1NormalMap, _Matcap1NormalMap_ST, _Matcap1NormalMapPan, _Matcap1NormalMapUV, _Matcap1NormalMapScale); + #endif + #endif + + matcapUV = 0; + + switch(_Matcap2UVMode) + { + // Normal / UTS + case 0: + { + float3 viewNormal = (mul(UNITY_MATRIX_V, float4(normal1, 0))).rgb; + float3 NormalBlend_MatCapUV_Detail = viewNormal.rgb * float3(-1, -1, 1); + float3 NormalBlend_MatCapUV_Base = (mul(UNITY_MATRIX_V, float4(poiCam.viewDir, 0)).rgb * float3(-1, -1, 1)) + float3(0, 0, 1); + float3 noSknewViewNormal = NormalBlend_MatCapUV_Base * dot(NormalBlend_MatCapUV_Base, NormalBlend_MatCapUV_Detail) / NormalBlend_MatCapUV_Base.b - NormalBlend_MatCapUV_Detail; + + matcapUV = noSknewViewNormal.rg * _Matcap2Border + 0.5; + break; + } + // Top Pinch + case 1: + { + float3 worldViewUp = normalize(float3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, float3(0, 1, 0))); + float3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + matcapUV = float2(dot(worldViewRight, normal1), dot(worldViewUp, normal1)) * _Matcap2Border + 0.5; + break; + } + // Custom Double Sided + case 2: + { + float3 reflection = reflect(-poiCam.viewDir, normal1); + float2 uv = float2(dot(reflection, float3(1, 0, 0)), dot(reflection, float3(0, 1, 0))); + matcapUV = uv * _Matcap2Border + 0.5; + break; + } + } + if (IsInMirror()) + { + matcapUV.x = 1 - matcapUV.x; + } + + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap2)) * float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #else + matcap2 = float4(poiThemeColor(poiMods, _Matcap2Color.rgb, _Matcap2ColorThemeIndex), _Matcap2Color.a); + #endif + matcap2.rgb *= _Matcap2Intensity; + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiUV(poiMesh.uv[_Matcap2MaskUV], _Matcap2Mask_ST), _Matcap2MaskPan); + #else + matcap2Mask = 1; + #endif + if (_Matcap2MaskInvert) + { + matcap2Mask = 1 - matcap2Mask; + } + + poiFragData.alpha *= lerp(1, matcap2.a, matcap2Mask * _Matcap2AlphaOverride); + + //UNITY_BRANCH + if (_Matcap2HueShiftEnabled) + { + matcap2.rgb = hueShift(matcap2.rgb, _Matcap2HueShift + _Time.x * _Matcap2HueShiftSpeed); + } + + blendMatcap(poiLight, poiFragData, _Matcap2Add, _Matcap2Multiply, _Matcap2Replace, matcap2, matcap2Mask, _Matcap2EmissionStrength, _Matcap2LightMask + #ifdef POI_BLACKLIGHT + , _BlackLightMaskMatcap2 + #endif + ); + #endif + } + #endif + + #ifdef _CUBEMAP + void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods) + { + float3 CubeMapUV = 0; + + switch(_CubeMapUVMode) + { + // Skybox + case 0: + { + CubeMapUV = -poiCam.viewDir; + break; + } + // Reflection + case 1: + { + CubeMapUV = poiCam.reflectionDir; + break; + } + } + + #if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED) + float4 cubeMap = texCUBE(_CubeMap, CubeMapUV); + cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex); + #else + float4 cubeMap = float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1); + #endif + + cubeMap.rgb *= _CubeMapIntensity; + #if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED) + float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan); + #else + float CubeMapMask = 1; + #endif + + if (_CubeMapMaskInvert) + { + CubeMapMask = 1 - CubeMapMask; + } + + //UNITY_BRANCH + if (_CubeMapHueShiftEnabled) + { + cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed); + } + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, _CubeMapReplace * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, _CubeMapMultiply * CubeMapMask * cubeMap.a); + poiFragData.baseColor.rgb += cubeMap.rgb * _CubeMapAdd * CubeMapMask * cubeMap.a; + poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a; + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + void ApplyRimLighting(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiUV(poiMesh.uv[_RimWidthNoiseTextureUV], _RimWidthNoiseTexture_ST), _RimWidthNoiseTexturePan); + #else + float rimNoise = 0; + #endif + + rimNoise = (rimNoise - .5) * _RimWidthNoiseStrength; + + float viewDotNormal = saturate(abs(dot(poiCam.viewDir, poiMesh.normals[_RimLightNormal]))); + + UNITY_BRANCH + if (_RimLightingInvert) + { + viewDotNormal = 1 - viewDotNormal; + } + float rimStrength = _RimStrength; + float rimBrighten = _RimBrighten; + + float rimWidth = lerp( - .05, 1, _RimWidth); + /* + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + rimWidth = clamp(rimWidth + lerp(_AudioLinkRimWidthAdd.x, _AudioLinkRimWidthAdd.y, poiMods.audioLink[_AudioLinkRimWidthBand]), - .05, 1); + rimStrength += lerp(_AudioLinkRimEmissionAdd.x, _AudioLinkRimEmissionAdd.y, poiMods.audioLink[_AudioLinkRimEmissionBand]); + rimBrighten += lerp(_AudioLinkRimBrightnessAdd.x, _AudioLinkRimBrightnessAdd.y, poiMods.audioLink[_AudioLinkRimBrightnessBand]); + } + #endif + */ + + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiUV(poiMesh.uv[_RimMaskUV], _RimMask_ST), _RimMaskPan); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + float4 rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiUV(poiMesh.uv[_RimTexUV], _RimTex_ST), _RimTexPan) * float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #else + float4 rimColor = float4(poiThemeColor(poiMods, _RimLightColor.rgb, _RimLightColorThemeIndex), _RimLightColor.a); + #endif + + UNITY_BRANCH + if (_RimHueShiftEnabled) + { + rimColor.rgb = hueShift(rimColor.rgb, _RimHueShift + _Time.x * _RimHueShiftSpeed); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - _ShadowMixThreshold) * _ShadowMixWidthMod, _ShadowMix), 0); + float rim = 1 - smoothstep(min(_RimSharpness, rimWidth), rimWidth, viewDotNormal); + rim *= _RimLightColor.a * rimColor.a * rimMask; + poiFragData.emission += rim * lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimStrength; + poiFragData.baseColor = lerp(poiFragData.baseColor, lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) + lerp(poiFragData.baseColor, rimColor, _RimLightColorBias) * rimBrighten, rim); + } + #endif + + #ifdef _SUNDISK_SIMPLE + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(_GlitterMinMaxSaturation.x, _GlitterMinMaxSaturation.y, rando.x); + fixed value = lerp(_GlitterMinMaxBrightness.x, _GlitterMinMaxBrightness.y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + // Scale + float2 st = frac(poiMesh.uv[_GlitterUV] + _GlitterUVPanning.xy * _Time.x) * _GlitterFrequency; + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j++) + { + for (int i = -1; i <= 1; i++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(_GlitterJitter * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = _GlitterSize; + UNITY_BRANCH + if (_GlitterRandomSize) + { + size = remapClamped(0, 1, randomFromPoint, _GlitterMinMaxSize.x, _GlitterMinMaxSize.y); + } + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(_GlitterShape) + { + case 0: //circle + glitterAlpha = 1 - saturate((m_dist - size) / clamp(fwidth(m_dist), 0.0001, 1.0)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * _GlitterJaggyFix; + + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + half3 glitterColor = poiThemeColor(poiMods, _GlitterColor, _GlitterColorThemeIndex); + + float3 norm = poiMesh.normals[1]; + float3 randomRotation = 0; + switch(_GlitterMode) + { + case 0: + UNITY_BRANCH + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, _GlitterBias), poiCam.viewDir)), _GlitterContrast), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * _GlitterSpeed) * _glitterFrequencyLinearEmissive - (_glitterFrequencyLinearEmissive - 1); + finalGlitter = max(_GlitterMinBrightness * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * _GlitterCenterSize * 10)); + break; + case 2: + if (_GlitterSpeed > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, _GlitterAngleRange, _GlitterSpeed); + } + else + { + randomRotation = randomFloat3Range(randoPoint, _GlitterAngleRange); + } + + float3 glitterLightReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + + #ifdef UNITY_PASS_FORWARDADD + glitterAlpha *= poiLight.nDotLSaturated * poiLight.attenuation; + #endif + #ifdef UNITY_PASS_FORWARDBASE + glitterAlpha *= poiLight.nDotLSaturated; + #endif + + float3 halfDir = normalize(poiLight.direction + poiCam.viewDir); + float specAngle = max(dot(halfDir, glitterLightReflectionDirection), 0.0); + + finalGlitter = lerp(0, _GlitterMinBrightness * glitterAlpha, glitterAlpha) + max(pow(specAngle, _GlitterContrast), 0); + + glitterColor *= poiLight.directColor; + finalGlitter *= glitterAlpha; + + break; + } + + glitterColor *= lerp(1, poiFragData.baseColor, _GlitterUseSurfaceColor); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiUV(poiMesh.uv[_GlitterColorMapUV], _GlitterColorMap_ST), _GlitterColorMapPan).rgb; + #endif + float2 uv = remapClamped(-size, size, dank, 0, 1); + UNITY_BRANCH + if (_GlitterRandomRotation == 1 || _GlitterTextureRotation != 0 && !_GlitterShape) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + UNITY_BRANCH + if (_GlitterRandomRotation) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * _GlitterTextureRotation) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, poiUV(uv, _GlitterTexture_ST), _GlitterTexturePan); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiUV(poiMesh.uv[_GlitterMaskUV], _GlitterMask_ST), _GlitterMaskPan); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.attenuation, _GlitterHideInShadow); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskGlitter != 4) + { + glitterMask *= blackLightMask[_BlackLightMaskGlitter]; + } + #endif + + if (_GlitterRandomColors) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + UNITY_BRANCH + if (_GlitterHueShiftEnabled) + { + glitterColor.rgb = hueShift(glitterColor.rgb, _GlitterHueShift + _Time.x * _GlitterHueShiftSpeed); + } + + UNITY_BRANCH + if (_GlitterBlendType == 1) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, finalGlitter * glitterColor * _GlitterBrightness, finalGlitter * glitterTexture.a * glitterMask); + poiFragData.emission += finalGlitter * glitterColor * max(0, (_GlitterBrightness - 1) * glitterTexture.a) * glitterMask; + } + else + { + poiFragData.emission += finalGlitter * glitterColor * _GlitterBrightness * glitterTexture.a * glitterMask; + } + } + #endif + + #ifdef MOCHIE_PBR + + bool SceneHasReflections() + { + float width, height; + unity_SpecCube0.GetDimensions(width, height); + return !(width * height < 2); + } + + float3 GetWorldReflections(float3 reflDir, float3 worldPos, float roughness) + { + float3 baseReflDir = reflDir; + reflDir = BoxProjection(reflDir, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); + float4 envSample0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p0 = DecodeHDR(envSample0, unity_SpecCube0_HDR); + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 refDirBlend = BoxProjection(baseReflDir, worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax); + float4 envSample1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, refDirBlend, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 p1 = DecodeHDR(envSample1, unity_SpecCube1_HDR); + p0 = lerp(p1, p0, interpolator); + } + return p0; + } + + float3 GetReflections(in PoiCam pc, in PoiLight pl, in PoiMesh pm, float roughness) + { + float3 reflections = 0; + float3 lighting = pl.finalLighting; + if (_MochieForceFallback == 0) + { + UNITY_BRANCH + if (SceneHasReflections()) + { + reflections = GetWorldReflections(pc.reflectionDir, pm.worldPos.xyz, roughness); + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + } + else + { + reflections = texCUBElod(_MochieReflCube, float4(pc.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + reflections = DecodeHDR(float4(reflections, 1), _MochieReflCube_HDR) * lerp(1, pl.finalLighting, _MochieLitFallback); + } + reflections *= pl.occlusion; + return reflections; + } + + float GetGGXTerm(in PoiLight pl, float roughness) + { + float visibilityTerm = 0; + if (pl.nDotL > 0) + { + float rough = roughness; + float rough2 = roughness * roughness; + + float lambdaV = pl.nDotL * (pl.nDotV * (1 - rough) + rough); + float lambdaL = pl.nDotV * (pl.nDotL * (1 - rough) + rough); + + visibilityTerm = 0.5f / (lambdaV + lambdaL + 1e-5f); + float d = (pl.nDotH * rough2 - pl.nDotH) * pl.nDotH + 1.0f; + float dotTerm = UNITY_INV_PI * rough2 / (d * d + 1e-7f); + + visibilityTerm *= dotTerm * UNITY_PI; + } + return visibilityTerm; + } + + void GetSpecFresTerm(in PoiLight pl, inout float3 specularTerm, inout float3 fresnelTerm, float3 specCol, float roughness) + { + specularTerm = GetGGXTerm(pl, roughness); + fresnelTerm = FresnelTerm(specCol, pl.lDotH); + specularTerm = max(0, specularTerm * max(0.00001, pl.nDotL)); + } + + float GetRoughness(float smoothness) + { + float rough = 1 - smoothness; + rough *= 1.7 - 0.7 * rough; + return rough; + } + + void MochieBRDF(inout PoiFragData pfd, in PoiCam pc, in PoiLight pl, in PoiMesh pm, in PoiMods poiMods) + { + float smoothness = _MochieRoughnessMultiplier; + float metallic = _MochieMetallicMultiplier; + float specularMask = 1; + float reflectionMask = 1; + + #if defined(PROP_MOCHIEMETALLICMAPS) || !defined(OPTIMIZER_ENABLED) + float4 PRBMaps = POI2D_SAMPLER_PAN(_MochieMetallicMaps, _MainTex, poiUV(pm.uv[_MochieMetallicMapsUV], _MochieMetallicMaps_ST), _MochieMetallicMapsPan); + metallic *= PRBMaps.r; + smoothness = (smoothness * PRBMaps.g); + reflectionMask *= PRBMaps.b; + specularMask *= PRBMaps.a; + #endif + + if (_MochieSpecularMaskInvert) + { + specularMask = 1 - specularMask; + } + if (_MochieReflectionMaskInvert) + { + reflectionMask = 1 - reflectionMask; + } + + if (_MochieRoughnessMapInvert) + { + smoothness = 1 - smoothness; + } + float roughness = GetRoughness(smoothness); + if (_MochieMetallicMapInvert) + { + metallic = 1 - metallic; + } + float3 specCol = lerp(unity_ColorSpaceDielectricSpec.rgb, pfd.baseColor, metallic); + float omr = unity_ColorSpaceDielectricSpec.a - metallic * unity_ColorSpaceDielectricSpec.a; + float percepRough = 1 - smoothness; + float brdfRoughness = percepRough * percepRough; + brdfRoughness = max(brdfRoughness, 0.002); + + float3 lighting = pl.finalLighting; + float3 diffuse = pfd.baseColor; + float3 specular = 0; + float3 reflections = 0; + float3 environment = 0; + + // Specular + // if (_SpecularMode == 0){ + if (_MochieSpecularStrength > 0) + { + float3 fresnelTerm = 1; + float3 specularTerm = 1; + GetSpecFresTerm(pl, specularTerm, fresnelTerm, specCol, brdfRoughness); + specular = lighting * specularTerm * fresnelTerm * specularMask * poiThemeColor(poiMods, _MochieSpecularTint, _MochieSpecularTintThemeIndex) * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + } + // } + // else { + // float specArea = 0.5 * dot(pl.halfDir, pm.normals[1]); + // float3 specularMap = POI2D_SAMPLER_PAN(_YMTSpecularMap, _MainTex, poiUV(pm.uv[_YMTSpecularMapUV], _YMTSpecularMap_ST), _YMTSpecularMapPan); + + // // Spec 1 + // // r: noise, g: noise mask, b: feather + // float4 specularOptMap1 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap1, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap1UV], _YMTSpecularOptMap1_ST), _YMTSpecularOptMap1Pan); + // float spec1 = saturate(specArea - saturate(((1-specularOptMap1.r) * specularOptMap1.g) - _YMTLayer1Offset)); + // float specMask1 = pow(spec1, exp2(lerp(11, 1, _YMTLayer1Size))); + // specMask1 = saturate((specMask1 - 0.01) / (saturate(specularOptMap1.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer1Strength; + + // // Spec 2 + // float specMask2 = 0; + // if (_UseSpecularOptMap2) + // { + // float4 specularOptMap2 = POI2D_SAMPLER_PAN(_YMTSpecularOptMap2, _MainTex, poiUV(pm.uv[_YMTSpecularOptMap2UV], _YMTSpecularOptMap2_ST), _YMTSpecularOptMap2Pan); + // float spec2 = saturate(specArea - saturate(((1-specularOptMap2.r) * specularOptMap2.g) - _YMTLayer2Offset)); + // specMask2 = pow(spec2, exp2(lerp(11, 1, _YMTLayer2Size))); + // specMask2 = saturate((specMask2 - 0.01) / (saturate(specularOptMap2.b * max(0.0001, _YMTSpecularFeather)))) * _YMTLayer2Strength; + // } + + // float specMask = saturate(specMask1 + specMask2); + // specular = specularMap * _MochieSpecularTint * lerp(1, lighting, _YMTUseLightColor) * specMask * pl.occlusion * pl.attenuation * _MochieSpecularStrength; + // } + + // Reflections + if (_MochieReflectionStrength > 0) + { + float surfaceReduction = (1.0 / (brdfRoughness * brdfRoughness + 1.0)); + float grazingTerm = saturate(smoothness + (1 - omr)); + float3 reflCol = GetReflections(pc, pl, pm, roughness); + float reflStr = reflectionMask * _MochieReflectionStrength; + reflections = surfaceReduction * reflCol * FresnelLerp(specCol, grazingTerm, pl.nDotV); + reflections *= poiThemeColor(poiMods, _MochieReflectionTint, _MochieReflectionTintThemeIndex) * reflStr; + #ifdef UNITY_PASS_FORWARDADD + reflections *= pl.attenuation; + #endif + diffuse = lerp(diffuse, diffuse * omr, reflStr); + } + + environment = specular + reflections; + diffuse *= lighting; + diffuse += environment; + pfd.finalColor = diffuse; + } + + #endif + + #ifdef _COLORCOLOR_ON + float3 CalculateClearCoatEnvironmentalReflections(PoiMesh poiMesh, PoiCam poiCam, PoiLight poiLight, PoiMods poiMods) + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1; + #endif + + if (_ClearCoatInvertSmoothness == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = (1 - smoothnessMap) * (1 - _ClearCoatSmoothness); + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = reflect(-poiCam.viewDir, poiMesh.normals[_ClearCoatNormal]);; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + UNITY_BRANCH + if (_ClearCoatSampleWorld == 1 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if (_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * poiThemeColor(poiMods, _ClearCoatTint, _ClearCoatTintThemeIndex); + } + + void calculateAndApplyClearCoat(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiLight poiLight, in PoiMods poiMods) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + float clearCoatMap = POI2D_SAMPLER_PAN(_ClearCoatMask, _MainTex, poiUV(poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMask_ST), _ClearCoatMaskPan); + #else + float clearCoatMap = 1; + #endif + + float3 reflectionColor = CalculateClearCoatEnvironmentalReflections(poiMesh, poiCam, poiLight, poiMods); + float nDotV = dot(poiMesh.normals[_ClearCoatNormal], poiCam.viewDir); + float NormalDotView = abs(dot(_ClearCoat, nDotV).r); + poiFragData.finalColor += reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var) * (clearCoatMap * _ClearCoat * clamp(FresnelTerm(_ClearCoat, NormalDotView), 0, 1)); + } + #endif + + #ifdef POI_ENVIRORIM + void applyEnvironmentRim(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(_RimEnviroSharpness, _RimEnviroWidth), _RimEnviroWidth, poiCam.vDotN)); + _RimEnviroBlur *= 1.7 - 0.7 * _RimEnviroBlur; + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], _RimEnviroBlur * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + + half enviroMask = 1; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[_RimEnviroMaskUV], _RimEnviroMaskPan).rgb); + #endif + float3 envRimCol = lerp(0, max(0, (enviroRimColor - _RimEnviroMinBrightness) * poiFragData.baseColor), enviroRimAlpha).rgb * enviroMask * _RimEnviroIntensity; + poiFragData.finalColor += envRimCol; + } + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + void stylizedSpecular(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiLight poiLight, in PoiMesh poiMesh, in PoiMods poiMods) + { + float specArea = 0.5 * dot(poiLight.halfDir, poiMesh.normals[1]) + 0.5; + #if defined(PROP_HIGHCOLOR_TEX) || !defined(OPTIMIZER_ENABLED) + float3 specularMap = POI2D_SAMPLER_PAN(_HighColor_Tex, _MainTex, poiUV(poiMesh.uv[_HighColor_TexUV], _HighColor_Tex_ST), _HighColor_TexPan); + #else + float3 specularMap = 1; + #endif + + // Spec 1 + float specMask1 = 0; + if (_Is_SpecularToHighColor) + { + specMask1 = pow(specArea, exp2(lerp(11, 1, _HighColor_Power))); + } + else + { + specMask1 = aaBlurStep(specArea, (1.0 - pow(_HighColor_Power, 5)), _StylizedSpecularFeather); + } + specMask1 *= _Layer1Strength; + + // Spec 2 + float specMask2 = 0; + if (_Is_SpecularToHighColor) + { + specMask2 = pow(specArea, exp2(lerp(11, 1, _Layer2Size))); + } + else + { + specMask2 = aaBlurStep(specArea, (1.0 - pow(_Layer2Size, 5)), _StylizedSpecular2Feather); + } + specMask2 *= _Layer2Strength; + + #if defined(PROP_SET_HIGHCOLORMASK) || !defined(OPTIMIZER_ENABLED) + float specularMask = POI2D_SAMPLER_PAN(_Set_HighColorMask, _MainTex, poiUV(poiMesh.uv[_Set_HighColorMaskUV], _Set_HighColorMask_ST), _Set_HighColorMaskPan).g; + #else + float specularMask = 1; + #endif + + specularMask = saturate(specularMask + _Tweak_HighColorMaskLevel); + + float specMask = saturate(specMask1 + specMask2) * specularMask * poiLight.rampedLightMap; + float3 specular = specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor) * specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength; + + if (_Is_BlendAddToHiColor == 1) + { + poiFragData.emission += specular; + } + else + { + poiFragData.baseColor = lerp(poiFragData.baseColor, specularMap * poiThemeColor(poiMods, _HighColor, _HighColorThemeIndex) * lerp(1, poiLight.directColor, _UseLightColor), saturate(specMask * poiLight.occlusion * poiLight.attenuation * _StylizedSpecularStrength)); + } + + //poiFragData.baseColor = _StylizedSpecularStrength; + + } + #endif + + #ifdef POI_PATHING + void applyPathing(inout PoiFragData pfd, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 albedo = pfd.baseColor; + float3 pathEmission; + + #if defined(PROP_PATHINGMAP) || !defined(OPTIMIZER_ENABLED) + float4 path = _PathingMap.Sample(SmpRepeatPoint, poiMesh.uv[_PathingMapUV]); + #else + float4 path = float4(0, 0, 0, 0); + return; + #endif + + #if defined(PROP_PATHINGCOLORMAP) || !defined(OPTIMIZER_ENABLED) + float4 pathColorMap = POI2D_SAMPLER_PAN(_PathingColorMap, _MainTex, poiMesh.uv[_PathingColorMapUV], _PathingColorMapPan); + #else + float4 pathColorMap = float4(1, 1, 1, 1); + #endif + + float3 pathAudioLinkEmission = 0; + float3 pathTime = 0; + float3 pathAlpha[3] = { + float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0) + }; + + #ifdef COLOR_GRADING_LOG_VIEW + half pathAudioLinkPathTimeOffsetBand[3] = { + _AudioLinkPathTimeOffsetBandR, _AudioLinkPathTimeOffsetBandG, _AudioLinkPathTimeOffsetBandB + }; + half2 pathAudioLinkTimeOffset[3] = { + _AudioLinkPathTimeOffsetR.xy, _AudioLinkPathTimeOffsetG.xy, _AudioLinkPathTimeOffsetB.xy + }; + half pathAudioLinkPathWidthOffsetBand[3] = { + _AudioLinkPathWidthOffsetBandR, _AudioLinkPathWidthOffsetBandG, _AudioLinkPathWidthOffsetBandB + }; + half2 pathAudioLinkWidthOffset[3] = { + _AudioLinkPathWidthOffsetR.xy, _AudioLinkPathWidthOffsetG.xy, _AudioLinkPathWidthOffsetB.xy + }; + + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + // Emission + pathAudioLinkEmission.r = lerp(_AudioLinkPathEmissionAddR.x, _AudioLinkPathEmissionAddR.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandR]); + pathAudioLinkEmission.g = lerp(_AudioLinkPathEmissionAddG.x, _AudioLinkPathEmissionAddG.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandG]); + pathAudioLinkEmission.b = lerp(_AudioLinkPathEmissionAddB.x, _AudioLinkPathEmissionAddB.y, poiMods.audioLink[_AudioLinkPathEmissionAddBandB]); + } + #endif + + [unroll] + for (int index = 0; index < 3; index++) + { + pathTime[index] = _PathTime[index] != -999.0f ? frac(_PathTime[index] + _PathOffset[index]) : frac(_Time.x * _PathSpeed[index] + _PathOffset[index]); + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathTime[index] += lerp(pathAudioLinkTimeOffset[index].x, pathAudioLinkTimeOffset[index].y, poiMods.audioLink[pathAudioLinkPathTimeOffsetBand[index]]); + } + #endif + + if (_PathSegments[index]) + { + float pathSegments = abs(_PathSegments[index]); + pathTime = (ceil(pathTime * pathSegments) - .5) / pathSegments; + } + + if (path[index]) + { + // Cutting it in half because it goes out in both directions for now + half pathWidth = _PathWidth[index] * .5; + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (poiMods.audioLinkAvailable) + { + pathWidth += lerp(pathAudioLinkWidthOffset[index].x, pathAudioLinkWidthOffset[index].y, poiMods.audioLink[pathAudioLinkPathWidthOffsetBand[index]]); + } + #endif + + //fill + pathAlpha[index].x = pathTime[index] > path[index]; + //path + pathAlpha[index].y = saturate((1 - abs(lerp(-pathWidth, 1 + pathWidth, pathTime[index]) - path[index])) - (1 - pathWidth)) * (1 / pathWidth); + //loop + pathAlpha[index].z = saturate((1 - distance(pathTime[index], path[index])) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index].z += saturate(distance(pathTime[index], path[index]) - (1 - pathWidth)) * (1 / pathWidth); + pathAlpha[index] = smoothstep(0, _PathSoftness[index] + .00001, pathAlpha[index]); + } + } + + // Emission + pathEmission = 0; + pathEmission += pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * (_PathEmissionStrength[0] + pathAudioLinkEmission.r); + pathEmission += pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * (_PathEmissionStrength[1] + pathAudioLinkEmission.g); + pathEmission += pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * (_PathEmissionStrength[2] + pathAudioLinkEmission.b); + pathEmission *= pathColorMap.rgb * pathColorMap.a * path.a; + + float3 colorReplace = 0; + colorReplace = pathAlpha[0][_PathTypeR] * poiThemeColor(poiMods, _PathColorR.rgb, _PathColorRThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorR.a * pathAlpha[0][_PathTypeR]); + colorReplace = pathAlpha[1][_PathTypeG] * poiThemeColor(poiMods, _PathColorG.rgb, _PathColorGThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorG.a * pathAlpha[1][_PathTypeG]); + colorReplace = pathAlpha[2][_PathTypeB] * poiThemeColor(poiMods, _PathColorB.rgb, _PathColorBThemeIndex) * pathColorMap.rgb; + albedo.rgb = lerp(albedo.rgb, colorReplace + albedo.rgb * 0.00001, pathColorMap.a * path.a * _PathColorB.a * pathAlpha[2][_PathTypeB]); + + pfd.baseColor = albedo.rgb; + pfd.emission += pathEmission; + } + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + #ifdef POI_IRIDESCENCE + float3 calculateNormal(PoiMesh poiMesh, float3 baseNormal) + { + float3 normal = baseNormal; + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_IridescenceNormalMap, _MainTex, poiUV(poiMesh.uv[_IridescenceNormalMapUV], _IridescenceNormalMap_ST), _IridescenceNormalMapPan), _IridescenceNormalIntensity); + normal = normalize(normal.x * poiMesh.tangent + normal.y * poiMesh.binormal + normal.z * baseNormal); + #endif + return normal; + } + + void applyIridescence(inout PoiFragData poiFragData, PoiMesh poiMesh, PoiCam poiCam) + { + float3 normal = poiMesh.normals[_IridescenceNormalSelection]; + if (_IridescenceNormalToggle) + { + normal = calculateNormal(poiMesh, normal); + + } + float ndotv = dot(normal, poiCam.viewDir); + + float4 iridescenceColor = 0; + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, (1 - abs(ndotv)) + _IridescenceRampPan * _Time.x + _IridescenceRamp_ST.zw); + if (_IridescenceHueShiftEnabled == 1){ + float hue = _IridescenceHueShift + frac(_Time.x * _IridescenceHueShiftSpeed); + iridescenceColor.rgb = hueShift(iridescenceColor.rgb, hue); + } + #endif + + float iridescenceMask = 1; + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + iridescenceMask = POI2D_SAMPLER_PAN(_IridescenceMask, _MainTex, poiUV(poiMesh.uv[_IridescenceMaskUV], _IridescenceMask_ST), _IridescenceMaskPan); + #endif + + #ifdef POI_BLACKLIGHT + if(_BlackLightMaskIridescence != 4) + { + iridescenceMask *= blackLightMask[_BlackLightMaskIridescence]; + } + #endif + + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, saturate(iridescenceColor.rgb * _IridescenceIntensity), iridescenceColor.a * _IridescenceReplaceBlend * iridescenceMask); + poiFragData.baseColor.rgb += saturate(iridescenceColor.rgb * _IridescenceIntensity * iridescenceColor.a * _IridescenceAddBlend * iridescenceMask); + poiFragData.baseColor.rgb *= saturate(lerp(1, iridescenceColor.rgb * _IridescenceIntensity, iridescenceColor.a * _IridescenceMultiplyBlend * iridescenceMask)); + poiFragData.emission += saturate(iridescenceColor.rgb * _IridescenceIntensity) * iridescenceColor.a * iridescenceMask * _IridescenceEmissionStrength; + } + #endif + + #ifdef EFFECT_BUMP + + float2 TransformUV(float2 offset, float rotation, float2 scale, float2 uv) + { + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); + } + + float2 getAsciiCoordinate(float index) + { + return float2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE : ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(_TextPositionOffset, _TextPositionRotation, _TextPositionScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = _TextPositionPadding; + textPositionPadding *= 1 / totalCharacters; + + uv = remapClamped(startUV, endUV, uv, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex), opacity * _TextPositionColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextPositionColor.rgb, _TextPositionColorThemeIndex) * opacity * _TextPositionEmissionStrength; + } + + void ApplyTimeText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(_TextTimeOffset, _TextTimeRotation, _TextTimeScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textTimePadding = _TextTimePadding; + textTimePadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex), opacity * _TextTimeColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextTimeColor.rgb, _TextTimeColorThemeIndex) * opacity * _TextTimeEmissionStrength; + } + + void ApplyFPSText(inout PoiFragData poiFragData, float2 uv, in PoiMods poiMods) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(_TextFPSOffset, _TextFPSRotation, _TextFPSScale, uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + float2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + float4 textFPSPadding = _TextFPSPadding; + textFPSPadding *= 1 / totalCharacters; + + uv = remapClamped(float2(startUV, 0), float2(endUV, 1), uv, float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = _TextPixelRange / _TextGlyphs_TexelSize.zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + poiFragData.baseColor = lerp(poiFragData.baseColor, poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex), opacity * _TextFPSColor.a); + globalTextEmission += poiThemeColor(poiMods, _TextFPSColor.rgb, _TextFPSColorThemeIndex) * opacity * _TextFPSEmissionStrength; + } + + void ApplyTextOverlayColor(inout PoiFragData poiFragData, PoiMesh poiMesh, in PoiMods poiMods) + { + globalTextEmission = 0; + float positionalOpacity = 0; + + if (_TextFPSEnabled == 1) + ApplyFPSText(poiFragData, poiMesh.uv[_TextFPSUV], poiMods); + if (_TextPositionEnabled == 1) + ApplyPositionText(poiFragData, poiMesh.uv[_TextPositionUV], poiMods); + if (_TextTimeEnabled == 1) + ApplyTimeText(poiFragData, poiMesh.uv[_TextTimeUV], poiMods); + + poiFragData.emission += globalTextEmission; + } + #endif + + #ifdef MOCHIE_POSTPROCESS + float oetf_sRGB_scalar(float L) { + float V = 1.055 * (pow(L, 1.0 / 2.4)) - 0.055; + if (L <= 0.0031308) + V = L * 12.92; + return V; + } + + float3 oetf_sRGB(float3 L) { + return float3(oetf_sRGB_scalar(L.r), oetf_sRGB_scalar(L.g), oetf_sRGB_scalar(L.b)); + } + + float eotf_sRGB_scalar(float V) { + float L = pow((V + 0.055) / 1.055, 2.4); + if (V <= oetf_sRGB_scalar(0.0031308)) + L = V / 12.92; + return L; + } + + float3 GetHDR(float3 rgb) { + return float3(eotf_sRGB_scalar(rgb.r), eotf_sRGB_scalar(rgb.g), eotf_sRGB_scalar(rgb.b)); + } + + float3 GetContrast(float3 col, float contrast){ + return lerp(float3(0.5,0.5,0.5), col, contrast); + } + + float3 GetSaturation(float3 col, float interpolator){ + return lerp(dot(col, float3(0.3,0.59,0.11)), col, interpolator); + } + + void applyPostProcessing(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float3 col = poiFragData.finalColor; + col = hueShift(col, _PPHue); + col *= _PPTint; + col *= _PPRGB; + col = GetSaturation(col, _PPSaturation); + col = lerp(col, GetHDR(col), _PPHDR); + col = GetContrast(col, _PPContrast); + col *= _PPBrightness; + col += _PPLightness; + + #if defined(PROP_PPLUT) || !defined(OPTIMIZER_ENABLED) + float3 satCol = saturate(col); + float maxColor = COLORS - 1.0; + float halfColX = 0.5 / _PPLUT_TexelSize.z; + float halfColY = 0.5 / _PPLUT_TexelSize.w; + float threshold = maxColor / COLORS; + float xOffset = halfColX + satCol.r * threshold / COLORS; + float yOffset = halfColY + satCol.g * threshold; + float cell = floor(satCol.b * maxColor); + float2 lutUV = float2(cell / COLORS + xOffset, yOffset); + float3 lutSample = _PPLUT.Sample(sampler_PPLUT, lutUV); + col = lerp(col, lutSample, _PPLUTStrength); + #endif + + #if defined(PROP_PPMASK) || !defined(OPTIMIZER_ENABLED) + float ppMask = POI2D_SAMPLER_PAN(_PPMask, _MainTex, poiUV(poiMesh.uv[_PPMaskUV], _PPMask_ST), _PPMaskPan).r; + ppMask = lerp(ppMask, 1-ppMask, _PPMaskInvert); + col = lerp(poiFragData.finalColor, col, ppMask); + #endif + + poiFragData.finalColor = col; + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + calculateGlobalThemes(poiMods); + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + poiLight.finalLightAdd = 0; + #if defined(PROP_LIGHTINGAOMAPS) || !defined(OPTIMIZER_ENABLED) + float4 AOMaps = POI2D_SAMPLER_PAN(_LightingAOMaps, _MainTex, poiUV(poiMesh.uv[_LightingAOMapsUV], _LightingAOMaps_ST), _LightingAOMapsPan); + poiLight.occlusion = lerp(1, AOMaps.r, _LightDataAOStrengthR) * lerp(1, AOMaps.g, _LightDataAOStrengthG) * lerp(1, AOMaps.b, _LightDataAOStrengthB) * lerp(1, AOMaps.a, _LightDataAOStrengthA); + #else + poiLight.occlusion = 1; + #endif + #if defined(PROP_LIGHTINGDETAILSHADOWMAPS) || !defined(OPTIMIZER_ENABLED) + float4 DetailShadows = POI2D_SAMPLER_PAN(_LightingDetailShadowMaps, _MainTex, poiUV(poiMesh.uv[_LightingDetailShadowMapsUV], _LightingDetailShadowMaps_ST), _LightingDetailShadowMapsPan); + poiLight.detailShadow = lerp(1, DetailShadows.r, _LightingDetailShadowStrengthR) * lerp(1, DetailShadows.g, _LightingDetailShadowStrengthG) * lerp(1, DetailShadows.b, _LightingDetailShadowStrengthB) * lerp(1, DetailShadows.a, _LightingDetailShadowStrengthA); + #else + poiLight.detailShadow = 1; + #endif + #if defined(PROP_LIGHTINGSHADOWMASKS) || !defined(OPTIMIZER_ENABLED) + float4 ShadowMasks = POI2D_SAMPLER_PAN(_LightingShadowMasks, _MainTex, poiUV(poiMesh.uv[_LightingShadowMasksUV], _LightingShadowMasks_ST), _LightingShadowMasksPan); + poiLight.shadowMask = lerp(1, ShadowMasks.r, _LightingShadowMaskStrengthR) * lerp(1, ShadowMasks.g, _LightingShadowMaskStrengthG) * lerp(1, ShadowMasks.b, _LightingShadowMaskStrengthB) * lerp(1, ShadowMasks.a, _LightingShadowMaskStrengthA); + #else + poiLight.shadowMask = 1; + #endif + + #ifdef UNITY_PASS_FORWARDBASE + + bool lightExists = false; + if (any(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + //UNITY_BRANCH + if (_LightingAdditiveLimitIntensity == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / _LightingAdditiveMaxIntensity)); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif + + //UNITY_BRANCH + if (_LightingColorMode == 0) // Poi Custom Light Color + + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + poiLight.directColor = properLightColor * max(0.0001, (target / properLuminance)); + + poiLight.indirectColor = BetterSH9(float4(lerp(0, poiMesh.normals[1], _LightingIndirectUsesNormals), 1)); + } + + //UNITY_BRANCH + if (_LightingColorMode == 1) // More standard approach to light color + + { + float3 indirectColor = BetterSH9(float4(poiMesh.normals[1], 1)); + if (lightExists) + { + poiLight.directColor = _LightColor0.rgb; + poiLight.indirectColor = indirectColor; + } + else + { + poiLight.directColor = indirectColor * 0.6; + poiLight.indirectColor = indirectColor * 0.5; + } + } + + if (_LightingColorMode == 2) // UTS style + + { + poiLight.indirectColor = saturate(max(half3(0.05, 0.05, 0.05) * _Unlit_Intensity, max(ShadeSH9(half4(0.0, 0.0, 0.0, 1.0)), ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)).rgb) * _Unlit_Intensity)); + poiLight.directColor = max(poiLight.indirectColor, _LightColor0.rgb); + } + + float lightMapMode = _LightingMapMode; + //UNITY_BRANCH + if (_LightingDirectionMode == 0) + { + poiLight.direction = _WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz; + } + if (_LightingDirectionMode == 1 || _LightingDirectionMode == 2) + { + //UNITY_BRANCH + if (_LightingDirectionMode == 1) + { + poiLight.direction = mul(unity_ObjectToWorld, _LightngForcedDirection).xyz;; + } + //UNITY_BRANCH + if (_LightingDirectionMode == 2) + { + poiLight.direction = _LightngForcedDirection; + } + if (lightMapMode == 0) + { + lightMapMode == 1; + } + } + + if (_LightingDirectionMode == 3) // UTS + + { + float3 defaultLightDirection = normalize(UNITY_MATRIX_V[2].xyz + UNITY_MATRIX_V[1].xyz); + float3 lightDirection = normalize(lerp(defaultLightDirection, _WorldSpaceLightPos0.xyz, any(_WorldSpaceLightPos0.xyz))); + poiLight.direction = lightDirection; + } + + poiLight.direction = normalize(poiLight.direction); + poiLight.attenuationStrength = _LightingCastedShadows; + poiLight.attenuation = 1; + if (!all(_LightColor0.rgb == 0.0)) + { + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.attenuation *= attenuation; + } + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = abs(dot(poiMesh.normals[1], poiCam.viewDir)); + poiLight.nDotH = max(0.00001, dot(poiMesh.normals[1], poiLight.halfDir)); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = max(0.00001, dot(poiLight.direction, poiLight.halfDir)); + + //UNITY_BRANCH + if (lightMapMode == 0) // Poi special light map + + { + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + float3 greyScaleVector = float3(.33333, .33333, .33333); + float bw_lightColor = dot(poiLight.directColor, greyScaleVector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, poiLight.attenuationStrength)) + dot(ShadeSH9(float4(poiMesh.normals[1], 1)), greyScaleVector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, greyScaleVector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, greyScaleVector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting) * poiLight.detailShadow; + } + //UNITY_BRANCH + if (lightMapMode == 1) // Normalized nDotL + + { + poiLight.lightMap = poiLight.nDotLNormalized; + } + //UNITY_BRANCH + if (lightMapMode == 2) // Saturated nDotL + + { + poiLight.lightMap = poiLight.nDotLSaturated; + } + + poiLight.directColor = max(poiLight.directColor, poiLight.directColor / max(0.0001, (calculateluminance(poiLight.directColor) / _LightingMinLightBrightness))); + poiLight.indirectColor = max(poiLight.indirectColor, poiLight.indirectColor / max(0.0001, (calculateluminance(poiLight.indirectColor) / _LightingMinLightBrightness))); + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingMonochromatic); + //UNITY_BRANCH + if (_LightingCapEnabled) + { + poiLight.directColor = min(poiLight.directColor, _LightingCap); + poiLight.indirectColor = min(poiLight.indirectColor, _LightingCap); + } + + //UNITY_BRANCH + if (_LightingForceColorEnabled) + { + poiLight.directColor = poiThemeColor(poiMods, _LightingForcedColor, _LightingForcedColorThemeIndex); + } + + #ifdef UNITY_PASS_FORWARDBASE + poiLight.directColor = max(poiLight.directColor * _PPLightingMultiplier, 0); + poiLight.directColor = max(poiLight.directColor + _PPLightingAddition, 0); + poiLight.indirectColor = max(poiLight.indirectColor * _PPLightingMultiplier, 0); + poiLight.indirectColor = max(poiLight.indirectColor + _PPLightingAddition, 0); + #endif + + #endif + + #ifdef UNITY_PASS_FORWARDADD + #ifndef POI_LIGHT_DATA_ADDITIVE_ENABLE + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE) && defined(DIRECTIONAL) + return float4(mainTexture.rgb * .0001, 1); + #endif + + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + + #ifdef POINT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(input, poiMesh.worldPos); + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)).xyz; + poiLight.attenuation = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + poiLight.additiveShadow = UNITY_SHADOW_ATTENUATION(i, poiMesh.worldPos); + unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(poiMesh.worldPos, 1)); + poiLight.attenuation = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + UNITY_LIGHT_ATTENUATION(attenuation, i, poiMesh.worldPos) + poiLight.additiveShadow == 0; + poiLight.attenuation = attenuation; + #endif + poiLight.directColor = _LightingAdditiveLimited ? min(_LightingAdditiveLimit, _LightColor0.rgb) : _LightColor0.rgb; + + #if defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE) + poiLight.indirectColor = 0; + #else + poiLight.indirectColor = lerp(0, poiLight.directColor, _LightingAdditivePassthrough); + #endif + + poiLight.directColor = lerp(poiLight.directColor, dot(poiLight.directColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + poiLight.indirectColor = lerp(poiLight.indirectColor, dot(poiLight.indirectColor, float3(0.299, 0.587, 0.114)), _LightingAdditiveMonochromatic); + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotLSaturated = saturate(poiLight.nDotL); + poiLight.nDotLNormalized = (poiLight.nDotL + 1) * 0.5; + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); + poiLight.lightMap = 1; + #endif + + #ifdef POI_LIGHT_DATA_DEBUG + + #ifdef UNITY_PASS_FORWARDBASE + //UNITY_BRANCH + if (_LightingDebugVisualize <= 6) + { + switch(_LightingDebugVisualize) + { + case 0: // Direct Light Color + return float4(poiLight.directColor + mainTexture.rgb * .0001, 1); + break; + case 1: // Indirect Light Color + return float4(poiLight.indirectColor + mainTexture.rgb * .0001, 1); + break; + case 2: // Light Map + return float4(poiLight.lightMap + mainTexture.rgb * .0001, 1); + break; + case 3: // Attenuation + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 4: // N Dot L + return float4(poiLight.nDotLNormalized, poiLight.nDotLNormalized, poiLight.nDotLNormalized, 1) + mainTexture * .0001; + break; + case 5: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + case 6: + return float4(poiLight.direction, 1) + mainTexture * .0001; + break; + } + } + else + { + return POI_SAFE_RGB1; + } + #endif + #ifdef UNITY_PASS_FORWARDADD + //UNITY_BRANCH + if (_LightingDebugVisualize < 6) + { + return POI_SAFE_RGB1; + } + else + { + switch(_LightingDebugVisualize) + { + case 7: + return float4(poiLight.directColor * poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 8: + return float4(poiLight.attenuation + mainTexture.rgb * .0001, 1); + break; + case 9: + return float4(poiLight.additiveShadow + mainTexture.rgb * .0001, 1); + break; + case 10: + return float4(poiLight.nDotLNormalized + mainTexture.rgb * .0001, 1); + break; + case 11: + return float4(poiLight.halfDir, 1) + mainTexture * .0001; + break; + } + } + #endif + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + #ifdef FINALPASS + ApplyDetailColor(poiFragData, poiMesh, poiMods); + #endif + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef VIGNETTE + calculateRGBMask(poiFragData, poiMesh, poiMods); + #endif + + #ifdef GEOM_TYPE_BRANCH + applyDecals(poiFragData, poiMesh, poiCam, poiMods, poiLight); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #if defined(_LIGHTINGMODE_SHADEMAP) && defined(VIGNETTE_MASKED) + #ifndef POI_PASS_OUTLINE + applyShadeMapping(poiFragData, poiMesh, poiLight); + #endif + #endif + + #ifdef VIGNETTE_MASKED + #ifdef POI_PASS_OUTLINE + //UNITY_BRANCH + if (_OutlineLit) + { + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + } + else + { + poiLight.finalLighting = 1; + } + #else + calculateShading(poiLight, poiFragData, poiMesh, poiCam); + #endif + #else + poiLight.finalLighting = 1; + poiLight.rampedLightMap = aaBlurStep(poiLight.nDotL, 0.1, .1); + #endif + + #if defined(POI_MATCAP0) || defined(COLOR_GRADING_HDR_3D) + applyMatcap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef _CUBEMAP + applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef _GLOSSYREFLECTIONS_OFF + ApplyRimLighting(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef _SUNDISK_SIMPLE + applyGlitter(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_STYLIZED_StylizedSpecular + stylizedSpecular(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef POI_PATHING + applyPathing(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + #ifdef POI_IRIDESCENCE + applyIridescence(poiFragData, poiMesh, poiCam); + #endif + + #ifdef EFFECT_BUMP + ApplyTextOverlayColor(poiFragData, poiMesh, poiMods); + #endif + + UNITY_BRANCH + if (_AlphaPremultiply) + { + poiFragData.baseColor *= saturate(poiFragData.alpha); + } + poiFragData.finalColor = poiFragData.baseColor; + + poiFragData.finalColor = poiFragData.baseColor * poiLight.finalLighting; + poiFragData.finalColor += poiLight.finalLightAdd; + + #if defined(MOCHIE_PBR) + MochieBRDF(poiFragData, poiCam, poiLight, poiMesh, poiMods); + #endif + + #ifdef _COLORCOLOR_ON + calculateAndApplyClearCoat(poiFragData, poiMesh, poiCam, poiLight, poiMods); + #endif + + #ifdef POI_ENVIRORIM + applyEnvironmentRim(poiFragData, poiMesh, poiCam); + #endif + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor * poiFragData.alpha, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + Pass + { + Tags { "LightMode" = "ShadowCaster" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask Off + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM + + #pragma target 5.0 + + #pragma shader_feature_local POI_UDIMDISCARD + + #pragma shader_feature USER_LUT + + #pragma shader_feature_local POI_PARALLAX + + #pragma shader_feature COLOR_GRADING_LOG_VIEW + + #pragma shader_feature_local POI_LIGHT_DATA_DEBUG + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_ENABLE + #pragma shader_feature_local POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE + #pragma shader_feature_local POI_VERTEXLIGHT_ON + + #pragma shader_feature COLOR_GRADING_HDR + + //#pragma shader_feature KEYWORD + + #pragma shader_feature FINALPASS + + #pragma shader_feature AUTO_EXPOSURE + + #pragma shader_feature_local POI_BACKFACE + + #pragma shader_feature VIGNETTE + #pragma shader_feature GEOM_TYPE_MESH + + #pragma shader_feature GEOM_TYPE_BRANCH + #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature GEOM_TYPE_FROND + #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + + #pragma shader_feature DISTORT + + #pragma shader_feature VIGNETTE_MASKED + #pragma shader_feature_local _LIGHTINGMODE_TEXTURERAMP _LIGHTINGMODE_MATHRAMP _LIGHTINGMODE_SHADEMAP _LIGHTINGMODE_REALISTIC _LIGHTINGMODE_WRAPPED _LIGHTINGMODE_SKIN _LIGHTINGMODE_FLAT _LIGHTINGMODE_CLOTH + #pragma shader_feature_local POI_CLOTHLERP + + #pragma shader_feature COLOR_GRADING_HDR_3D + #pragma shader_feature_local POI_MATCAP0 + #pragma shader_feature_local POI_MATCAP0_CUSTOM_NORMAL + #pragma shader_feature_local POI_MATCAP1_CUSTOM_NORMAL + + #pragma shader_feature_local _CUBEMAP + + #pragma shader_feature_local POI_AL_DECAL + + #pragma shader_feature _SUNDISK_HIGH_QUALITY + + #pragma shader_feature _EMISSION + #pragma shader_feature_local POI_EMISSION_1 + #pragma shader_feature_local POI_EMISSION_2 + #pragma shader_feature_local POI_EMISSION_3 + + #pragma shader_feature _GLOSSYREFLECTIONS_OFF + + #pragma shader_feature _SUNDISK_SIMPLE + + #pragma shader_feature_local MOCHIE_PBR + + #pragma shader_feature_local _COLORCOLOR_ON + + #pragma shader_feature_local POI_ENVIRORIM + + #pragma shader_feature_local POI_STYLIZED_StylizedSpecular + + #pragma shader_feature_local POI_PATHING + + #pragma shader_feature_local POI_MIRROR + + #pragma shader_feature GRAIN + + #pragma shader_feature_local POI_IRIDESCENCE + + #pragma shader_feature EFFECT_BUMP + + #pragma shader_feature_local MOCHIE_POSTPROCESS + + #pragma multi_compile_instancing + #pragma multi_compile_shadowcaster + #pragma multi_compile_fog + #define POI_PASS_SHADOW + + // UNITY Includes + #include "UnityCG.cginc" + #include "UnityStandardUtils.cginc" + #include "AutoLight.cginc" + #include "UnityLightingCommon.cginc" + #include "UnityPBSLighting.cginc" + #pragma vertex vert + #pragma fragment frag + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan)) + #define POI2D_SAMPLER_PANGRAD(tex, texSampler, uv, pan, ddx, ddy) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv + _Time.x * pan, ddx, ddy)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, uv)) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, uv + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, uv)) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, uv)) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, uv + _Time.x * pan)) + + #define POI2D_MAINTEX_SAMPLER_PAN_INLINED(tex, poiMesh) (POI2D_SAMPLER_PAN(tex, _MainTex, poiUV(poiMesh.uv[tex##UV], tex##_ST), tex##Pan)) + + #define POI_SAFE_RGB1 float4(mainTexture.rgb * .0001, 1) + #define POI_SAFE_RGBA mainTexture + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type, name) name = (type)0; + #else + #define PoiInitStruct(type, name) + #endif + + #define POI_ERROR(poiMesh, gridSize) lerp(float3(1, 0, 1), float3(0, 0, 0), fmod(floor((poiMesh.worldPos.x) * gridSize) + floor((poiMesh.worldPos.y) * gridSize) + floor((poiMesh.worldPos.z) * gridSize), 2) == 0) + + #define POI_MODE_OPAQUE 0 + #define POI_MODE_CUTOUT 1 + #define POI_MODE_FADE 2 + #define POI_MODE_TRANSPARENT 3 + #define POI_MODE_ADDITIVE 4 + #define POI_MODE_SOFTADDITIVE 5 + #define POI_MODE_MULTIPLICATIVE 6 + #define POI_MODE_2XMULTIPLICATIVE 7 + #define POI_MODE_TRANSCLIPPING 9 + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + + [HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos XZ, 5, Polar UV, 6, Distorted UV, 7 )] + */ + // Map of where features in AudioLink are. + #define ALPASS_DFT uint2(0,4) //Size: 128, 2 + #define ALPASS_WAVEFORM uint2(0,6) //Size: 128, 16 + #define ALPASS_AUDIOLINK uint2(0,0) //Size: 128, 4 + #define ALPASS_AUDIOBASS uint2(0,0) //Size: 128, 1 + #define ALPASS_AUDIOLOWMIDS uint2(0,1) //Size: 128, 1 + #define ALPASS_AUDIOHIGHMIDS uint2(0,2) //Size: 128, 1 + #define ALPASS_AUDIOTREBLE uint2(0,3) //Size: 128, 1 + #define ALPASS_AUDIOLINKHISTORY uint2(1,0) //Size: 127, 4 + #define ALPASS_GENERALVU uint2(0,22) //Size: 12, 1 + #define ALPASS_CCINTERNAL uint2(12,22) //Size: 12, 2 + #define ALPASS_CCCOLORS uint2(25,22) //Size: 11, 1 + #define ALPASS_CCSTRIP uint2(0,24) //Size: 128, 1 + #define ALPASS_CCLIGHTS uint2(0,25) //Size: 128, 2 + #define ALPASS_AUTOCORRELATOR uint2(0,27) //Size: 128, 1 + #define ALPASS_GENERALVU_INSTANCE_TIME uint2(2,22) + #define ALPASS_GENERALVU_LOCAL_TIME uint2(3,22) + #define ALPASS_GENERALVU_NETWORK_TIME uint2(4,22) + #define ALPASS_GENERALVU_PLAYERINFO uint2(6,22) + // Added in version 2.5 + #define ALPASS_FILTEREDAUDIOLINK uint2(0,28) //Size: 16, 4 + // Added in version 2.6 + #define ALPASS_CHRONOTENSITY uint2(16,28) //Size: 8, 4 + #define ALPASS_THEME_COLOR0 uint2(0,23) + #define ALPASS_THEME_COLOR1 uint2(1,23) + #define ALPASS_THEME_COLOR2 uint2(2,23) + #define ALPASS_THEME_COLOR3 uint2(3,23) + #define ALPASS_FILTEREDVU uint2(24,28) //Size: 4, 4 + #define ALPASS_FILTEREDVU_INTENSITY uint2(24,28) //Size: 4, 1 + #define ALPASS_FILTEREDVU_MARKER uint2(24,29) //Size: 4, 1 + + // Some basic constants to use (Note, these should be compatible with + // future version of AudioLink, but may change. + #define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change. + #define AUDIOLINK_SAMPLEDATA24 2046 + #define AUDIOLINK_EXPBINS 24 + #define AUDIOLINK_EXPOCT 10 + #define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT) + #define AUDIOLINK_WIDTH 128 + #define AUDIOLINK_SPS 48000 // Samples per second + #define AUDIOLINK_ROOTNOTE 0 + #define AUDIOLINK_4BAND_FREQFLOOR 0.123 + #define AUDIOLINK_4BAND_FREQCEILING 1 + #define AUDIOLINK_BOTTOM_FREQUENCY 13.75 + #define AUDIOLINK_BASE_AMPLITUDE 2.5 + #define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3 + #define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9 + #define AUDIOLINK_DFT_Q 4.0 + #define AUDIOLINK_TREBLE_CORRECTION 5.0 + + // ColorChord constants + #define COLORCHORD_EMAXBIN 192 + #define COLORCHORD_IIR_DECAY_1 0.90 + #define COLORCHORD_IIR_DECAY_2 0.85 + #define COLORCHORD_CONSTANT_DECAY_1 0.01 + #define COLORCHORD_CONSTANT_DECAY_2 0.0 + #define COLORCHORD_NOTE_CLOSEST 3.0 + #define COLORCHORD_NEW_NOTE_GAIN 8.0 + #define COLORCHORD_MAX_NOTES 10 + + // We use glsl_mod for most calculations because it behaves better + // on negative numbers, and in some situations actually outperforms + // HLSL's modf(). + #ifndef glsl_mod + #define glsl_mod(x, y) (((x) - (y) * floor((x) / (y)))) + #endif + + uniform float4 _AudioTexture_TexelSize; + + #ifdef SHADER_TARGET_SURFACE_ANALYSIS + #define AUDIOLINK_STANDARD_INDEXING + #endif + + // Mechanism to index into texture. + #ifdef AUDIOLINK_STANDARD_INDEXING + sampler2D _AudioTexture; + #define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0)) + #else + uniform Texture2D _AudioTexture; + SamplerState sampler_AudioTexture; + #define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)] + #endif + + float _Mode; + + #ifdef POI_UDIMDISCARD + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float4 _UDIMDiscardRow3; + float4 _UDIMDiscardRow2; + float4 _UDIMDiscardRow1; + float4 _UDIMDiscardRow0; + #endif + + #ifdef USER_LUT + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture; + float4 _DistortionFlowTexture_ST; + float2 _DistortionFlowTexturePan; + float _DistortionFlowTextureUV; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionFlowTexture1; + float4 _DistortionFlowTexture1_ST; + float2 _DistortionFlowTexture1Pan; + float _DistortionFlowTexture1UV; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DistortionMask; + float4 _DistortionMask_ST; + float2 _DistortionMaskPan; + float _DistortionMaskUV; + #endif + + float _DistortionUvToDistort; + float _DistortionStrength; + float _DistortionStrength1; + #endif + float _StereoEnabled; + float _PolarUV; + float2 _PolarCenter; + float _PolarRadialScale; + float _PolarLengthScale; + float _PolarSpiralPower; + float _PanoUseBothEyes; + + #ifdef POI_PARALLAX + + sampler2D _HeightMap; + float4 _HeightMap_ST; + float2 _HeightMapPan; + float _HeightMapUV; + + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _Heightmask; + #endif + float4 _Heightmask_ST; + float2 _HeightmaskPan; + float _HeightmaskUV; + float _HeightmaskInvert; + + float _ParallaxUV; + float _HeightStrength; + float _HeightOffset; + float _HeightStepsMin; + float _HeightStepsMax; + + float _CurvatureU; + float _CurvatureV; + float _CurvFix; + /* + */ + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + float _AudioLinkDelay; + float _AudioLinkAnimToggle; + float _DebugWaveform; + float _DebugDFT; + float _DebugBass; + float _DebugLowMids; + float _DebugHighMids; + float _DebugTreble; + float _DebugCCColors; + float _DebugCCStrip; + float _DebugCCLights; + float _DebugAutocorrelator; + float _DebugChronotensity; + float _AudioLinkCCStripY; + #endif + + float _IgnoreFog; + float _RenderingReduceClipDistance; + + float4 _Color; + float _ColorThemeIndex; + UNITY_DECLARE_TEX2D(_MainTex); + float4 _MainTex_ST; + float2 _MainTexPan; + float _MainTexUV; + float4 _MainTex_TexelSize; + Texture2D _BumpMap; + float4 _BumpMap_ST; + float2 _BumpMapPan; + float _BumpMapUV; + float _BumpScale; + Texture2D _ClippingMask; + float4 _ClippingMask_ST; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + float _Inverse_Clipping; + float _Cutoff; + + float _MainColorAdjustToggle; + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MainColorAdjustTexture; + #endif + float4 _MainColorAdjustTexture_ST; + float2 _MainColorAdjustTexturePan; + float _MainColorAdjustTextureUV; + float _MainHueShiftToggle; + float _MainHueShiftReplace; + float _MainHueShift; + float _MainHueShiftSpeed; + float _Saturation; + float _MainBrightness; + + float _MainHueALCTEnabled; + float _MainALHueShiftBand; + float _MainALHueShiftCTIndex; + float _MainHueALMotionSpeed; + + SamplerState sampler_linear_clamp; + SamplerState sampler_linear_repeat; + + float _AlphaForceOpaque; + float _AlphaMod; + float _AlphaPremultiply; + + float _AlphaToCoverage; + float _AlphasharpenedA2C; + float _AlphaMipScale; + + float _AlphaDithering; + float _AlphaDitherGradient; + + float _AlphaDistanceFade; + float _AlphaDistanceFadeType; + float _AlphaDistanceFadeMinAlpha; + float _AlphaDistanceFadeMaxAlpha; + float _AlphaDistanceFadeMin; + float _AlphaDistanceFadeMax; + + float _AlphaFresnel; + float _AlphaFresnelAlpha; + float _AlphaFresnelSharpness; + float _AlphaFresnelWidth; + float _AlphaFresnelInvert; + + float _AlphaAngular; + float _AngleType; + float _AngleCompareTo; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + + float _AlphaAudioLinkEnabled; + float2 _AlphaAudioLinkAddRange; + float _AlphaAudioLinkAddBand; + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef AUTO_EXPOSURE + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float3 _VertexManipulationLocalRotationSpeed; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + float _VertexManipulationHeight; + sampler2D _VertexManipulationHeightMask; + float4 _VertexManipulationHeightMask_ST; + float2 _VertexManipulationHeightMaskPan; + float _VertexManipulationHeightMaskUV; + float _VertexManipulationHeightBias; + float _VertexRoundingEnabled; + float _VertexRoundingDivision; + + //AL + float3 _VertexLocalTranslationALMin; + float3 _VertexLocalTranslationALMax; + float _VertexLocalTranslationALBand; + + float3 _VertexLocalRotationAL; + float _VertexLocalRotationALBand; + + float3 _VertexLocalRotationCTALSpeed; + float _VertexLocalRotationCTALBand; + float _VertexLocalRotationCTALType; + + float4 _VertexLocalScaleALMin; + float4 _VertexLocalScaleALMax; + float _VertexLocalScaleALBand; + + float3 _VertexWorldTranslationALMin; + float3 _VertexWorldTranslationALMax; + float _VertexWorldTranslationALBand; + + float2 _VertexManipulationHeightAL; + float _VertexManipulationHeightBand; + + float2 _VertexRoundingRangeAL; + float _VertexRoundingRangeBand; + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + float _MainVertexColoringLinearSpace; + float _MainVertexColoring; + float _MainUseVertexColorAlpha; + + #ifdef POI_BACKFACE + float _BackFaceEnabled; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float4 _BackFaceColor; + float _BackFaceColorThemeIndex; + float _BackFaceReplaceAlpha; + float _BackFaceAlpha; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceTexture; + #endif + float4 _BackFaceTexture_ST; + float2 _BackFaceTexturePan; + float _BackFaceTextureUV; + + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _BackFaceMask; + #endif + float4 _BackFaceMask_ST; + float2 _BackFaceMaskPan; + float _BackFaceMaskUV; + + float _BackFaceHueShiftEnabled; + float _BackFaceHueShift; + float _BackFaceHueShiftSpeed; + #endif + + //TODO detail strength stuff + + #ifdef DISTORT + float _DissolveType; + float _DissolveEdgeWidth; + float4 _DissolveEdgeColor; + sampler2D _DissolveEdgeGradient; + float4 _DissolveEdgeGradient_ST; + float2 _DissolveEdgeGradientPan; + float _DissolveEdgeGradientUV; + float _DissolveEdgeEmission; + float4 _DissolveTextureColor; + float _DissolveEdgeColorThemeIndex; + float _DissolveTextureColorThemeIndex; + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveToTexture; + #endif + float4 _DissolveToTexture_ST; + float2 _DissolveToTexturePan; + float _DissolveToTextureUV; + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveNoiseTexture; + #endif + float4 _DissolveNoiseTexture_ST; + float2 _DissolveNoiseTexturePan; + float _DissolveNoiseTextureUV; + + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveDetailNoise; + #endif + float4 _DissolveDetailNoise_ST; + float2 _DissolveDetailNoisePan; + float _DissolveDetailNoiseUV; + + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DissolveMask; + #endif + float4 _DissolveMask_ST; + float2 _DissolveMaskPan; + float _DissolveMaskUV; + + float _DissolveMaskInvert; + float _DissolveAlpha; + float _ContinuousDissolve; + float _DissolveDetailStrength; + float _DissolveEdgeHardness; + float _DissolveInvertNoise; + float _DissolveInvertDetailNoise; + float _DissolveToEmissionStrength; + + // Point to Point + float _DissolveP2PWorldLocal; + float _DissolveP2PEdgeLength; + float4 _DissolveStartPoint; + float4 _DissolveEndPoint; + + // World Dissolve + float _DissolveWorldShape; + float4 _DissolveShapePosition; + float4 _DissolveShapeRotation; + float _DissolveShapeScale; + float _DissolveInvertShape; + float _DissolveShapeEdgeLength; + + float _DissolveAlpha0; + float _DissolveAlpha1; + float _DissolveAlpha2; + float _DissolveAlpha3; + float _DissolveAlpha4; + float _DissolveAlpha5; + float _DissolveAlpha6; + float _DissolveAlpha7; + float _DissolveAlpha8; + float _DissolveAlpha9; + // Masking + float _DissolveEmissionSide; + float _DissolveEmission1Side; + float _DissolveUseVertexColors; + + float4 edgeColor; + float edgeAlpha; + float dissolveAlpha; + float4 dissolveToTexture; + + float _DissolveHueShiftEnabled; + float _DissolveHueShiftSpeed; + float _DissolveHueShift; + float _DissolveEdgeHueShiftEnabled; + float _DissolveEdgeHueShiftSpeed; + float _DissolveEdgeHueShift; + + // Audio Link + #ifdef COLOR_GRADING_LOG_VIEW + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; + #endif + #endif + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + float _ALDecalUV; + float4 _ALUVScale; + float2 _ALUVPosition; + float _ALUVRotation; + float _ALUVRotationSpeed; + float4 _ALDecaldCircleDimensions; + + float _ALDecalUVMode; + + float _ALDecalVolumeStep; + float _ALDecalVolumeClipMin; + float _ALDecalVolumeClipMax; + + float _ALDecalBandStep; + float _ALDecalBandClipMin; + float _ALDecalBandClipMax; + + float _ALDecalShapeClip; + float _ALDecalShapeClipVolumeWidth; + float _ALDecalShapeClipBandWidth; + + float _ALDecalVolume; + float _ALDecalBaseBoost; + float _ALDecalTrebleBoost; + float _ALDecalLineWidth; + float _ALDecalVolumeColorSource; + float3 _ALDecalVolumeColorLow; + float3 _ALDecalVolumeColorMid; + float3 _ALDecalVolumeColorHigh; + float _ALDecalLowEmission; + float _ALDecalMidEmission; + float _ALDecalHighEmission; + float _ALDecalBlendType; + float _ALDecalBlendAlpha; + float _ALDecalControlsAlpha; + #endif + #endif + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + #ifdef _SUNDISK_HIGH_QUALITY + + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); + float4 _FlipbookTexArray_ST; + + float4 _FlipbookColor; + float _FlipbookColorThemeIndex; + float _FlipbookFPS; + float _FlipbookTotalFrames; + float4 _FlipbookScaleOffset; + float4 _FlipbookSideOffset; + float _FlipbookTiled; + float _FlipbookCurrentFrame; + float _FlipbookEmissionStrength; + float _FlipbookRotation; + float _EnableFlipbook; + float _FlipbookTexArrayUV; + float _FlipbookAlphaControlsFinalAlpha; + float _FlipbookRotationSpeed; + float _FlipbookIntensityControlsAlpha; + float _FlipbookColorReplaces; + float2 _FlipbookTexArrayPan; + + // blending + float _FlipbookReplace; + float _FlipbookMultiply; + float _FlipbookAdd; + + #if defined(PROP_FLIPBOOKMASSK) || !defined(OPTIMIZED_ENABLED) + Texture2D _FlipbookMask; + #endif + float4 _FlipbookMask_ST; + float2 _FlipbookMaskPan; + float _FlipbookMaskUV; + + // anim + float _FlipbookMovementType; + float4 _FlipbookStartEndOffset; + float _FlipbookMovementSpeed; + + // Crossfade + float _FlipbookCrossfadeEnabled; + float2 _FlipbookCrossfadeRange; + + // Hueshift + float _FlipbookHueShiftEnabled; + float _FlipbookHueShiftSpeed; + float _FlipbookHueShift; + + #ifdef COLOR_GRADING_LOG_VIEW + float _FlipbookChronotensityEnabled; + float _FlipbookChronotensityBand; + float _FlipbookChronotensitySpeed; + #endif + #endif + + #ifdef POI_MIRROR + float _Mirror; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _MirrorTexture; + #endif + float4 _MirrorTexture_ST; + float2 _MirrorTexturePan; + float _MirrorTextureUV; + #endif + + #ifdef GRAIN + sampler2D _CameraDepthTexture; + #endif + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthMask; + #endif + float4 _DepthMask_ST; + float2 _DepthMaskPan; + float _DepthMaskUV; + + // Color + float _DepthColorToggle; + float _DepthColorBlendMode; + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + Texture2D _DepthTexture; + #endif + float4 _DepthTexture_ST; + float2 _DepthTexturePan; + float _DepthTextureUV; + + float3 _DepthColor; + float _DepthColorThemeIndex; + float _DepthColorMinDepth; + float _DepthColorMaxDepth; + float _DepthColorMinValue; + float _DepthColorMaxValue; + float _DepthEmissionStrength; + + // Emission + + // Alpha + float _DepthAlphaToggle; + float _DepthAlphaMinValue; + float _DepthAlphaMaxValue; + float _DepthAlphaMinDepth; + float _DepthAlphaMaxDepth; + + /* + Texture2D ; + float4 _ST; + float2 Pan; + float UV; + */ + + //Structs + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float4 color : COLOR; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + float3 objNormal : TEXCOORD4; + float3 normal : TEXCOORD5; + float3 tangent : TEXCOORD6; + float3 binormal : TEXCOORD7; + float4 worldPos : TEXCOORD8; + float4 localPos : TEXCOORD9; + float3 objectPos : TEXCOORD10; + float4 vertexColor : TEXCOORD11; + float4 lightmapUV : TEXCOORD12; + float4 grabPos: TEXCOORD13; + float4 worldDirection: TEXCOORD14; + UNITY_SHADOW_COORDS(15) + UNITY_FOG_COORDS(16) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct PoiMesh + { + + // 0 Vertex normal + // 1 Fragment normal + float3 normals[2]; + float3 objNormal; + float3 tangentSpaceNormal; + float3 binormal; + float3 tangent; + float3 worldPos; + float3 localPos; + float3 objectPosition; + float isFrontFace; + float4 vertexColor; + float4 lightmapUV; + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 7 Distorted UV + float2 uv[8]; + float2 parallaxUV; + }; + + struct PoiCam + { + float3 viewDir; + float3 forwardDir; + float3 worldPos; + float distanceToVert; + float4 clipPos; + float3 reflectionDir; + float3 tangentViewDir; + float4 grabPos; + float2 screenUV; + float vDotN; + float4 worldDirection; + + }; + + struct PoiMods + { + float4 Mask; + float4 audioLink; + float audioLinkAvailable; + float audioLinkVersion; + float4 audioLinkTexture; + float2 detailMask; + float2 backFaceDetailIntensity; + float4 globalColorTheme[12]; + float ALTime[8]; + }; + + struct PoiLight + { + + float3 direction; + float attenuation; + float attenuationStrength; + float3 directColor; + float3 indirectColor; + float occlusion; + float shadowMask; + float detailShadow; + float3 halfDir; + float lightMap; + float3 rampedLightMap; + float nDotL; + float nDotV; + float nDotH; + float lDotv; + float lDotH; + float nDotLSaturated; + float nDotLNormalized; + #ifdef UNITY_PASS_FORWARDADD + float additiveShadow; + #endif + float3 finalLighting; + float3 finalLightAdd; + + #if defined(VERTEXLIGHT_ON) && defined(POI_VERTEXLIGHT_ON) + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + #endif + + }; + + struct PoiVertexLights + { + + float3 direction; + float3 color; + float attenuation; + }; + + struct PoiFragData + { + float3 baseColor; + float3 finalColor; + float alpha; + float3 emission; + }; + + float2 poiUV(float2 uv, float4 tex_st) + { + return uv * tex_st.xy + tex_st.zw; + } + + //Lighting Helpers + float calculateluminance(float3 color) + { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + bool IsOrthographicCamera() + { + return unity_OrthoParams.w == 1 || UNITY_MATRIX_P[3][3] == 1; + } + + /* + * MIT License + * + * Copyright (c) 2018 s-ilent + * + * 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. + */ + + float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) + { + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); + } + + half3 BetterSH9(half4 normal) + { + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; + } + + // Silent's code ends here + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + half3 GetSHLength() + { + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + //UNITY_BRANCH + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float3 calculateNormal(in float3 baseNormal, in PoiMesh poiMesh, in Texture2D normalTexture, in float4 normal_ST, in float2 normalPan, in float normalUV, in float normalIntensity) + { + float3 normal = UnpackScaleNormal(POI2D_SAMPLER_PAN(normalTexture, _MainTex, poiUV(poiMesh.uv[normalUV], normal_ST), normalPan), normalIntensity); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + + float remap(float x, float minOld, float maxOld, float minNew = 0, float maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew = 0, float2 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew = 0, float3 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew = 0, float4 maxNew = 1) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float minOld, float maxOld, float x, float minNew = 0, float maxNew = 1) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 minOld, float2 maxOld, float2 x, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 minOld, float3 maxOld, float3 x, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 minOld, float4 maxOld, float4 x, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + float2 calcParallax(in float height, in PoiCam poiCam) + { + return((height * - 1) + 1) * (poiCam.tangentViewDir.xy / poiCam.tangentViewDir.z); + } + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend : max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend : min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend : min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)) : blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0 : 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)) : blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)) : blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range, float wiggleSpeed) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + wiggleSpeed; + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + //art + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if (Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if (HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if (H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if (H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if (H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if (H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if (H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if (H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if (H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if (HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + half2 calcScreenUVs(half4 grabPos) + { + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; + } + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + inline float4 CalculateFrustumCorrection() + { + float x1 = -UNITY_MATRIX_P._31 / (UNITY_MATRIX_P._11 * UNITY_MATRIX_P._34); + float x2 = -UNITY_MATRIX_P._32 / (UNITY_MATRIX_P._22 * UNITY_MATRIX_P._34); + return float4(x1, x2, 0, UNITY_MATRIX_P._33 / UNITY_MATRIX_P._34 + x1 * UNITY_MATRIX_P._13 + x2 * UNITY_MATRIX_P._23); + } + + float inverseLerp(float A, float B, float T) + { + return(T - A) / (B - A); + } + + float inverseLerp2(float2 a, float2 b, float2 value) + { + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp3(float3 a, float3 b, float3 value) + { + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + float inverseLerp4(float4 a, float4 b, float4 value) + { + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); + } + + /* + MIT License + + Copyright (c) 2019 wraikny + + 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. + + VertexTransformShader is dependent on: + */ + + float4 quaternion_conjugate(float4 v) + { + return float4( + v.x, -v.yzw + ); + } + + float4 quaternion_mul(float4 v1, float4 v2) + { + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); + } + + // angle : radians + float4 get_quaternion_from_angle(float3 axis, float angle) + { + float sn = sin(angle * 0.5); + float cs = cos(angle * 0.5); + return float4(axis * sn, cs); + } + + float4 quaternion_from_vector(float3 inVec) + { + return float4(0.0, inVec); + } + + float degree_to_radius(float degree) + { + return( + degree / 180.0 * pi + ); + } + + float3 rotate_with_quaternion(float3 inVec, float3 rotation) + { + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), radians(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), radians(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), radians(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; + } + + float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) + { + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz * rotation.w) + (pos.xyz * pos.w), input.w); + return input; + } + + /* + MIT END + */ + + float aaBlurStep(float gradient, float edge, float blur) + { + float edgeMin = saturate(edge); + float edgeMax = saturate(edge + blur * (1 - edge)); + return smoothstep(0, 1, saturate((gradient - edgeMin) / saturate(edgeMax - edgeMin + fwidth(gradient)))); + } + + float3 poiThemeColor(in PoiMods poiMods, in float3 srcColor, in float themeIndex) + { + if (themeIndex == 0) return srcColor; + themeIndex -= 1; + + if (themeIndex <= 3) + { + return poiMods.globalColorTheme[themeIndex]; + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable) + { + return poiMods.globalColorTheme[themeIndex]; + } + #endif + + return srcColor; + } + #ifdef COLOR_GRADING_LOG_VIEW + + // Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it. + float4 AudioLinkDataMultiline(uint2 xycoord) { return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x/AUDIOLINK_WIDTH)); } + + // Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling + float4 AudioLinkLerp(float2 xy) { return lerp( AudioLinkData(xy), AudioLinkData(xy+int2(1,0)), frac( xy.x ) ); } + + // Same as AudioLinkLerp but properly handles multiline reading. + float4 AudioLinkLerpMultiline(float2 xy) { return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy+float2(1,0)), frac(xy.x)); } + + //Tests to see if Audio Link texture is available + bool AudioLinkIsAvailable() + { + #if !defined(AUDIOLINK_STANDARD_INDEXING) + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #else + return _AudioTexture_TexelSize.z > 16; + #endif + } + + //Get version of audiolink present in the world, 0 if no audiolink is present + float AudioLinkGetVersion() + { + int2 dims; + #if !defined(AUDIOLINK_STANDARD_INDEXING) + _AudioTexture.GetDimensions(dims.x, dims.y); + #else + dims = _AudioTexture_TexelSize.zw; + #endif + + if (dims.x >= 128) + return AudioLinkData(ALPASS_GENERALVU).x; + else if (dims.x > 16) + return 1; + else + return 0; + } + + // This pulls data from this texture. + #define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy] + + // Extra utility functions for time. + uint AudioLinkDecodeDataAsUInt(uint2 indexloc) + { + uint4 rpx = AudioLinkData(indexloc); + return rpx.r + rpx.g*1024 + rpx.b * 1048576 + rpx.a * 1073741824; + } + + //Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing. + // if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times. + float AudioLinkDecodeDataAsSeconds(uint2 indexloc) + { + uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff; + //Can't just divide by float. Bug in Unity's HLSL compiler. + return float(time / 1000) + float( time % 1000 ) / 1000.; + } + + #define ALDecodeDataAsSeconds( x ) AudioLinkDecodeDataAsSeconds( x ) + #define ALDecodeDataAsUInt( x ) AudioLinkDecodeDataAsUInt( x ) + + float AudioLinkRemap(float t, float a, float b, float u, float v) { return ((t-a) / (b-a)) * (v-u) + u; } + + float3 AudioLinkHSVtoRGB(float3 HSV) + { + float3 RGB = 0; + float C = HSV.z * HSV.y; + float H = HSV.x * 6; + float X = C * (1 - abs(fmod(H, 2) - 1)); + if (HSV.y != 0) + { + float I = floor(H); + if (I == 0) { RGB = float3(C, X, 0); } + else if (I == 1) { RGB = float3(X, C, 0); } + else if (I == 2) { RGB = float3(0, C, X); } + else if (I == 3) { RGB = float3(0, X, C); } + else if (I == 4) { RGB = float3(X, 0, C); } + else { RGB = float3(C, 0, X); } + } + float M = HSV.z - C; + return RGB + M; + } + + float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote) + { + float note = bin / AUDIOLINK_EXPBINS; + + float hue = 0.0; + note *= 12.0; + note = glsl_mod(4. - note + rootNote, 12.0); + { + if(note < 4.0) + { + //Needs to be YELLOW->RED + hue = (note) / 24.0; + } + else if(note < 8.0) + { + // [4] [8] + //Needs to be RED->BLUE + hue = (note-2.0) / 12.0; + } + else + { + // [8] [12] + //Needs to be BLUE->YELLOW + hue = (note - 4.0) / 8.0; + } + } + float val = intensity - 0.1; + return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0))); + } + + // Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080]. + float4 AudioLinkGetAmplitudeAtFrequency(float hertz) + { + float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY); + return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0)); + } + + // Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11]. + float AudioLinkGetAmplitudeAtNote(float octave, float note) + { + float quarter = note * 2.0; + return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0)); + } + + // Get a reasonable drop-in replacement time value for _Time.y with the + // given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTime(uint index, uint band) + { + return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0; + } + + // Get a chronotensity value in the interval [0; 1], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed) + { + return frac(AudioLinkGetChronoTime(index, band) * speed); + } + + // Get a chronotensity value in the interval [0; interval], modulated by the speed input, + // with the given chronotensity index [0; 7] and AudioLink band [0; 3]. + float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval) + { + return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval; + } + + float getBandAtTime(float band, float time, float width, float size = 1.0f) + { + //return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1); + return remapClamped(min(size,.9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH,band)).r); + } + + fixed3 maximize(fixed3 c) { + if (c.x == 0 && c.y == 0 && c.z == 0) + return fixed3(1.0, 1.0, 1.0); + else + return c / max(c.r, max(c.g, c.b)); + } + + void initPoiAudioLink(inout PoiMods poiMods) + { + poiMods.audioLinkAvailable = AudioLinkIsAvailable(); + poiMods.audioLinkAvailable *= _AudioLinkAnimToggle; + + if (poiMods.audioLinkAvailable) + { + poiMods.audioLinkVersion = AudioLinkGetVersion(); + poiMods.audioLink.x = AudioLinkData(ALPASS_AUDIOBASS).r; + poiMods.audioLink.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + poiMods.audioLink.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + poiMods.audioLink.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + /* + poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) ); + poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) ); + poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) ); + poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) ); + + poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0); + poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0); + poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0); + poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0); + */ + + poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0)).x, AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0); + + poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0); + poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1); + poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2); + poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3); + } + } + + void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods){ + if (_DebugWaveform){ + float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2( 500. * poiMesh.uv[0].x, 0)).r; + poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1); + } + if (_DebugDFT){ + poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr; + } + if (_DebugBass){ + poiFragData.emission += poiMods.audioLink.x; + } + if (_DebugLowMids){ + poiFragData.emission += poiMods.audioLink.y; + } + if (_DebugHighMids){ + poiFragData.emission += poiMods.audioLink.z; + } + if (_DebugTreble){ + poiFragData.emission += poiMods.audioLink.w; + } + if (_DebugCCColors){ + poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0)); + } + if (_DebugCCStrip){ + poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0)); + } + if (_DebugCCLights){ + poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0)); + } + if (_DebugAutocorrelator){ + poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr); + } + if (_DebugChronotensity){ + poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0; + } + } + + void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh){ + initPoiAudioLink(poiMods); + DebugVisualizer(poiFragData, poiMesh, poiMods); + + if(_AudioLinkCCStripY) + { + poiFragData.emission += AudioLinkLerp( ALPASS_CCSTRIP + float2( poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0 ) ).rgb * .5; + } + } + + #endif + + v2f vert(appdata v) + { + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + PoiInitStruct(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef POI_UDIMDISCARD + UNITY_BRANCH + if(_UDIMDiscardMode == 0) // Discard Vertices instead of just pixels + { + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (v.uv0.xy * (_UDIMDiscardUV == 0)); + udim += (v.uv1.xy * (_UDIMDiscardUV == 1)); + udim += (v.uv2.xy * (_UDIMDiscardUV == 2)); + udim += (v.uv3.xy * (_UDIMDiscardUV == 3)); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) v.vertex = 0.0/0.0; // NaN position to discard; GPU discards degenerate geometry. thanks bgolus + } + #endif + + #ifdef AUTO_EXPOSURE + float4 audioLinkBands = 0; + float3 ALrotation = 0; + float3 ALLocalTranslation = 0; + float3 CTALRotation = 0; + float3 ALScale = 0; + float3 ALWorldTranslation = 0; + float ALHeight = 0; + float ALRoundingAmount = 0; + #ifdef COLOR_GRADING_LOG_VIEW + if (AudioLinkIsAvailable()) + { + audioLinkBands.x = AudioLinkData(ALPASS_AUDIOBASS).r; + audioLinkBands.y = AudioLinkData(ALPASS_AUDIOLOWMIDS).r; + audioLinkBands.z = AudioLinkData(ALPASS_AUDIOHIGHMIDS).r; + audioLinkBands.w = AudioLinkData(ALPASS_AUDIOTREBLE).r; + + if(any(_VertexLocalTranslationALMin) || any(_VertexLocalTranslationALMax)) + { + ALLocalTranslation = lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, audioLinkBands[_VertexLocalTranslationALBand]); + } + if(any(_VertexLocalRotationAL)) + { + ALrotation = audioLinkBands[_VertexLocalRotationALBand] * _VertexLocalRotationAL; + } + if(any(_VertexLocalRotationCTALSpeed)) + { + CTALRotation = AudioLinkGetChronoTime(_VertexLocalRotationCTALType, _VertexLocalRotationCTALBand) * _VertexLocalRotationCTALSpeed * 360; + } + if(any(_VertexLocalScaleALMin) || any(_VertexLocalScaleALMax)) + { + ALScale = lerp(_VertexLocalScaleALMin.xyz + _VertexLocalScaleALMin.w, _VertexLocalScaleALMax.xyz + _VertexLocalScaleALMax.w, audioLinkBands[_VertexLocalScaleALBand]); + } + if(any(_VertexWorldTranslationALMin) || any(_VertexWorldTranslationALMax)) + { + ALWorldTranslation = lerp(_VertexWorldTranslationALMin, _VertexWorldTranslationALMax, audioLinkBands[_VertexWorldTranslationALBand]); + } + if(any(_VertexManipulationHeightAL)) + { + ALHeight = lerp(_VertexManipulationHeightAL.x , _VertexManipulationHeightAL.y, audioLinkBands[_VertexManipulationHeightBand]); + } + if(any(_VertexRoundingRangeAL)) + { + ALRoundingAmount = lerp(_VertexRoundingRangeAL.x, _VertexRoundingRangeAL.y, audioLinkBands[_VertexRoundingRangeBand]); + } + } + #endif + + // Local Transformation + float4 rotation = float4(_VertexManipulationLocalRotation.xyz + float3(180,0,0) + _VertexManipulationLocalRotationSpeed * _Time.x + ALrotation + CTALRotation, _VertexManipulationLocalRotation.w); + v.normal = rotate_with_quaternion(v.normal, rotation.xyz); + v.tangent.xyz = rotate_with_quaternion(v.tangent.xyz, rotation.xyz); + v.vertex = transform(v.vertex, _VertexManipulationLocalTranslation + float4(ALLocalTranslation,0), rotation, _VertexManipulationLocalScale + float4(ALScale,0)); + o.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(poiUV(v.uv0, _VertexManipulationHeightMask_ST) + _VertexManipulationHeightMaskPan * _Time.x, 0, 0)).r - _VertexManipulationHeightBias) * (_VertexManipulationHeight + ALHeight) * o.normal; + #else + float3 heightOffset = (_VertexManipulationHeight + ALHeight) * o.normal; + #endif + + v.vertex.xyz += mul(unity_WorldToObject, _VertexManipulationWorldTranslation.xyz + ALWorldTranslation + heightOffset).xyz; + + // rounding + UNITY_BRANCH + if (_VertexRoundingEnabled) + { + float divisionAmount = _VertexRoundingDivision + ALRoundingAmount; + float3 worldRoundPosition = (ceil(mul(unity_ObjectToWorld, v.vertex.xyz) * divisionAmount) / divisionAmount) - 1 / divisionAmount * .5; + v.vertex = mul(unity_WorldToObject, worldRoundPosition); + } + #endif + + o.objectPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.objNormal = v.normal; + o.normal = UnityObjectToWorldNormal(v.normal); + o.tangent = UnityObjectToWorldDir(v.tangent); + + o.binormal = cross(o.normal, o.tangent) * (v.tangent.w * unity_WorldTransformParams.w); + o.vertexColor = v.color; + + o.uv[0] = v.uv0; + o.uv[1] = v.uv1; + o.uv[2] = v.uv2; + o.uv[3] = v.uv3; + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + float3 localOffset = float3(0, 0, 0); + float3 worldOffset = float3(0, 0, 0); + + o.localPos.rgb += localOffset; + o.worldPos.rgb += worldOffset; + + o.pos = UnityObjectToClipPos(o.localPos); + #ifdef POI_PASS_OUTLINE + #if defined(UNITY_REVERSED_Z) + //DX + o.pos.z += _Offset_Z * - 0.01; + #else + //OpenGL + o.pos.z += _Offset_Z * 0.01; + #endif + #endif + o.grabPos = ComputeGrabScreenPos(o.pos); + + if (_RenderingReduceClipDistance) + { + if (o.pos.w < _ProjectionParams.y * 1.01 && o.pos.w > 0) + { + o.pos.z = o.pos.z * 0.0001 + o.pos.w * 0.999; + } + } + + #ifndef FORWARD_META_PASS + #if !defined(UNITY_PASS_SHADOWCASTER) + UNITY_TRANSFER_SHADOW(o, o.uv[0].xy); + #else + TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos); + #endif + #endif + UNITY_TRANSFER_FOG(o, o.pos); + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + return o; + } + + #ifdef POI_UDIMDISCARD + void applyUDIMDiscard(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + float2 udim = floor(poiMesh.uv[_UDIMDiscardUV].xy); + + float isRendered = 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)); + + isRendered += (udim.y >= 0 && udim.y < 1) * dot(_UDIMDiscardRow0, xMask); + isRendered += (udim.y >= 1 && udim.y < 2) * dot(_UDIMDiscardRow1, xMask); + isRendered += (udim.y >= 2 && udim.y < 3) * dot(_UDIMDiscardRow2, xMask); + isRendered += (udim.y >= 3 && udim.y < 4) * dot(_UDIMDiscardRow3, xMask); + isRendered += (udim.y < 0 || udim.y >= 4) + (udim.x < 0 || udim.x >= 4); // never discard outside 4x4 grid in pos coords + + if(!isRendered) discard; + + return; + } + #endif + + float2 calculatePolarCoordinate(in PoiMesh poiMesh) + { + float2 delta = poiMesh.uv[_PolarUV] - _PolarCenter; + float radius = length(delta) * 2 * _PolarRadialScale; + float angle = atan2(delta.x, delta.y) * 1.0 / 6.28 * _PolarLengthScale; + return float2(radius, angle + distance(poiMesh.uv[_PolarUV], _PolarCenter) * _PolarSpiralPower); + } + + float2 MonoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + float2 StereoPanoProjection(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude, latitude) * float2(0.5 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(0.5, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 0.5).zw; + } + + float2 calculatePanosphereUV(in PoiMesh poiMesh) + { + float3 viewDirection = normalize(lerp(getCameraPosition().xyz, _WorldSpaceCameraPos.xyz, _PanoUseBothEyes) - poiMesh.worldPos.xyz) * - 1; + return lerp(MonoPanoProjection(viewDirection), StereoPanoProjection(viewDirection), _StereoEnabled); + } + + #ifdef USER_LUT + float2 distortedUV(in PoiMesh poiMesh) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = POI2D_SAMPLER_PAN(_DistortionFlowTexture, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTextureUV], _DistortionFlowTexture_ST), _DistortionFlowTexturePan) * 2 - 1; + #else + float4 flowVector = 0; + #endif + + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = POI2D_SAMPLER_PAN(_DistortionFlowTexture1, _MainTex, poiUV(poiMesh.uv[_DistortionFlowTexture1UV], _DistortionFlowTexture1_ST), _DistortionFlowTexture1Pan) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[_DistortionMaskUV], _DistortionMaskPan).r; + #else + half distortionMask = 1; + #endif + + half distortionStrength = _DistortionStrength; + half distortionStrength1 = _DistortionStrength1; + + flowVector *= distortionStrength; + flowVector1 *= distortionStrength1; + return poiMesh.uv[_DistortionUvToDistort] + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + #endif + + #ifdef POI_PARALLAX + inline float2 POM(in PoiLight poiLight, sampler2D heightMap, in PoiMesh poiMesh, float3 worldViewDir, float3 viewDirTan, int minSamples, int maxSamples, float parallax, float refPlane, float2 tilling, float2 curv) + { + float2 uvs = poiUV(poiMesh.uv[_HeightMapUV], _HeightMap_ST); + float2 dx = ddx(uvs); + float2 dy = ddy(uvs); + float3 result = 0; + int stepIndex = 0; + int numSteps = (int)lerp(maxSamples, minSamples, saturate(dot(poiMesh.normals[0], worldViewDir))); + float layerHeight = 1.0 / numSteps; + float2 plane = parallax * (viewDirTan.xy / viewDirTan.z); + uvs += refPlane * plane; + float2 deltaTex = -plane * layerHeight; + float2 prevTexOffset = 0; + float prevRayZ = 1.0f; + float prevHeight = 0.0f; + float2 currTexOffset = deltaTex; + float currRayZ = 1.0f - layerHeight; + float currHeight = 0.0f; + float intersection = 0; + float2 finalTexOffset = 0; + while (stepIndex < numSteps + 1) + { + result.z = dot(curv, currTexOffset * currTexOffset); + currHeight = tex2Dgrad(heightMap, uvs + currTexOffset, dx, dy).r * (1 - result.z); + if (currHeight > currRayZ) + { + stepIndex = numSteps + 1; + } + else + { + stepIndex++; + prevTexOffset = currTexOffset; + prevRayZ = currRayZ; + prevHeight = currHeight; + currTexOffset += deltaTex; + currRayZ -= layerHeight * (1 - result.z) * (1 + _CurvFix); + } + } + int sectionSteps = 10; + int sectionIndex = 0; + float newZ = 0; + float newHeight = 0; + while (sectionIndex < sectionSteps) + { + intersection = (prevHeight - prevRayZ) / (prevHeight - currHeight + currRayZ - prevRayZ); + finalTexOffset = prevTexOffset +intersection * deltaTex; + newZ = prevRayZ - intersection * layerHeight; + newHeight = tex2Dgrad(heightMap, uvs + finalTexOffset, dx, dy).r; + if (newHeight > newZ) + { + currTexOffset = finalTexOffset; + currHeight = newHeight; + currRayZ = newZ; + deltaTex = intersection * deltaTex; + layerHeight = intersection * layerHeight; + } + else + { + prevTexOffset = finalTexOffset; + prevHeight = newHeight; + prevRayZ = newZ; + deltaTex = (1 - intersection) * deltaTex; + layerHeight = (1 - intersection) * layerHeight; + } + sectionIndex++; + } + #ifdef UNITY_PASS_SHADOWCASTER + if (unity_LightShadowBias.z == 0.0) + { + #endif + if (result.z > 1) + clip(-1); + #ifdef UNITY_PASS_SHADOWCASTER + } + #endif + return uvs + finalTexOffset; + } + /* + float2 ParallaxOffsetMultiStep(float surfaceHeight, float strength, float2 uv, float3 tangentViewDir) + { + float2 uvOffset = 0; + float2 prevUVOffset = 0; + float stepSize = 1.0 / _HeightSteps; + float stepHeight = 1; + float2 uvDelta = tangentViewDir.xy * (stepSize * strength); + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + [unroll(20)] + for (int j = 1; j <= _HeightSteps && stepHeight > surfaceHeight; j++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + + [unroll(3)] + for (int k = 0; k < 3; k++) + { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) + { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else + { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = POI2D_SAMPLER_PAN(_Heightmap, _MainTex, poiUV(uv + uvOffset, _Heightmap_ST), _HeightmapPan) + _HeightOffset; + } + return uvOffset; + } + */ + void applyParallax(inout PoiMesh poiMesh, in PoiLight poiLight, in PoiCam poiCam) + { + /* + half h = POI2D_SAMPLER_PAN(_Heightmap, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmap_ST), _HeightmapPan).r + _HeightOffset; + #if defined(PROP_HEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + half m = POI2D_SAMPLER_PAN(_Heightmask, _linear_repeat, poiUV(poiMesh.uv[_HeightmaskUV], _Heightmask_ST), _HeightmaskPan).r + _HeightOffset; + #else + half m = 1 + _HeightOffset; + #endif + h = clamp(h, 0, 0.999); + m = lerp(m, 1 - m, _HeightmaskInvert); + #if defined(OPTIMIZER_ENABLED)das + poiMesh.uv[_ParallaxUV] += ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + #else + float2 offset = ParallaxOffsetMultiStep(h, _HeightStrength * m, poiMesh.uv[_HeightmapUV], tangentViewDir / tangentViewDir.z); + if (_ParallaxUV == 0) poiMesh.uv[0] += offset; + if (_ParallaxUV == 1) poiMesh.uv[1] += offset; + if (_ParallaxUV == 2) poiMesh.uv[2] += offset; + if (_ParallaxUV == 3) poiMesh.uv[3] += offset; + if (_ParallaxUV == 4) poiMesh.uv[4] += offset; + if (_ParallaxUV == 5) poiMesh.uv[5] += offset; + if (_ParallaxUV == 6) poiMesh.uv[6] += offset; + if (_ParallaxUV == 7) poiMesh.uv[7] += offset; + #endif + */ + + #if defined(OPTIMIZER_ENABLED) + poiMesh.uv[_ParallaxUV] = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + #else + float2 offset = POM(poiLight, _HeightMap, poiMesh, poiCam.viewDir, poiCam.tangentViewDir, _HeightStepsMin, _HeightStepsMax, _HeightStrength, 0, _HeightMap_ST.xy, float2(_CurvatureU, _CurvatureV)); + if (_ParallaxUV == 0) poiMesh.uv[0] = offset; + if (_ParallaxUV == 1) poiMesh.uv[1] = offset; + if (_ParallaxUV == 2) poiMesh.uv[2] = offset; + if (_ParallaxUV == 3) poiMesh.uv[3] = offset; + if (_ParallaxUV == 4) poiMesh.uv[4] = offset; + if (_ParallaxUV == 5) poiMesh.uv[5] = offset; + if (_ParallaxUV == 6) poiMesh.uv[6] = offset; + if (_ParallaxUV == 7) poiMesh.uv[7] = offset; + #endif + } + #endif + + void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods) + { + poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod); + + // Distance Fade + if (_AlphaDistanceFade) + { + float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition; + poiFragData.alpha *= lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos))); + } + + // Fresnel Alpha + if (_AlphaFresnel) + { + float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, poiCam.vDotN)); + holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha)); + poiFragData.alpha *= _AlphaFresnelInvert ?1 - holoRim : holoRim; + } + + if (_AlphaAngular) + { + half cameraAngleMin = _CameraAngleMin / 180; + half cameraAngleMax = _CameraAngleMax / 180; + half modelAngleMin = _ModelAngleMin / 180; + half modelAngleMax = _ModelAngleMax / 180; + float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection))); + half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5); + half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5); + if (_AngleType == 0) + { + poiFragData.alpha *= max(cameraLookAtModel, _AngleMinAlpha); + } + else if (_AngleType == 1) + { + poiFragData.alpha *= max(modelLookAtCamera, _AngleMinAlpha); + } + else if (_AngleType == 2) + { + poiFragData.alpha *= max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha); + } + } + + #ifdef COLOR_GRADING_LOG_VIEW + if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled) + { + poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand])); + } + #endif + } + + inline half Dither8x8Bayer(int x, int y) + { + const half dither[ 64 ] = { + 1, 49, 13, 61, 4, 52, 16, 64, + 33, 17, 45, 29, 36, 20, 48, 32, + 9, 57, 5, 53, 12, 60, 8, 56, + 41, 25, 37, 21, 44, 28, 40, 24, + 3, 51, 15, 63, 2, 50, 14, 62, + 35, 19, 47, 31, 34, 18, 46, 30, + 11, 59, 7, 55, 10, 58, 6, 54, + 43, 27, 39, 23, 42, 26, 38, 22 + }; + int r = y * 8 + x; + return dither[r] / 64; + } + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam) + { + if (_AlphaDithering) + { + poiFragData.alpha = poiFragData.alpha - (calcDither(poiCam.screenUV) * (1 - poiFragData.alpha) * _AlphaDitherGradient); + } + } + + void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + // Force Model Opacity to 1 if desired + UNITY_BRANCH + if (_Mode == 1) + { + UNITY_BRANCH + if (_AlphasharpenedA2C) + { + // rescale alpha by mip level + poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale; + // rescale alpha by partial derivative + poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff; + } + } + } + + void applyVertexColor(inout PoiFragData poiFragData, PoiMesh poiMesh) + { + #ifndef POI_PASS_OUTLINE + float3 vertCol = lerp(poiMesh.vertexColor.rgb, GammaToLinearSpace(poiMesh.vertexColor.rgb), _MainVertexColoringLinearSpace); + poiFragData.baseColor *= lerp(1, vertCol, _MainVertexColoring); + #endif + poiFragData.alpha *= lerp(1, poiMesh.vertexColor.a, _MainUseVertexColorAlpha); + } + + #ifdef POI_BACKFACE + void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods) + { + if (!poiMesh.isFrontFace) + { + float4 backFaceColor = _BackFaceColor; + backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex); + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan); + #endif + backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x) * _BackFaceHueShiftEnabled); + + float backFaceMask = 1; + #if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED) + backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan).r * _BackFaceAlpha * backFaceColor.a; + #endif + + poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask); + + UNITY_BRANCH + if (_BackFaceReplaceAlpha) + { + poiFragData.alpha = lerp(backFaceColor.a, poiFragData.alpha, backFaceMask); + } + + poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask; + } + } + #endif + + #ifdef DISTORT + void applyDissolve(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiUV(poiMesh.uv[_DissolveMaskUV], _DissolveMask_ST), _DissolveMaskPan).r; + #else + float dissolveMask = 1; + #endif + UNITY_BRANCH + if (_DissolveUseVertexColors) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiUV(poiMesh.uv[_DissolveToTextureUV], _DissolveToTexture_ST), _DissolveToTexturePan) * float4(poiThemeColor(poiMods, _DissolveTextureColor.rgb, _DissolveTextureColorThemeIndex), _DissolveTextureColor.a); + #else + dissolveToTexture = _DissolveTextureColor; + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiUV(poiMesh.uv[_DissolveNoiseTextureUV], _DissolveNoiseTexture_ST), _DissolveNoiseTexturePan).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = _DissolveAlpha + + _DissolveAlpha0 + + _DissolveAlpha1 + + _DissolveAlpha2 + + _DissolveAlpha3 + + _DissolveAlpha4 + + _DissolveAlpha5 + + _DissolveAlpha6 + + _DissolveAlpha7 + + _DissolveAlpha8 + + _DissolveAlpha9; + float dds = _DissolveDetailStrength; + + #ifdef COLOR_GRADING_LOG_VIEW + UNITY_BRANCH + if (_EnableDissolveAudioLink && poiMods.audioLinkAvailable) + { + da += lerp(_AudioLinkDissolveAlpha.x, _AudioLinkDissolveAlpha.y, poiMods.audioLink[_AudioLinkDissolveAlphaBand]); + dds += lerp(_AudioLinkDissolveDetail.x, _AudioLinkDissolveDetail.y, poiMods.audioLink[_AudioLinkDissolveDetailBand]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (_BlackLightMaskDissolve != 4) + { + dissolveMask *= blackLightMask[_BlackLightMaskDissolve]; + } + #endif + + if (_DissolveMaskInvert) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiUV(poiMesh.uv[_DissolveDetailNoiseUV], _DissolveDetailNoise_ST), _DissolveDetailNoisePan); + #else + float dissolveDetailNoise = 0; + #endif + if (_DissolveInvertNoise) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (_DissolveInvertDetailNoise) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (_ContinuousDissolve != 0) + { + da = sin(_Time.x * _ContinuousDissolve) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + if (_DissolveType == 1) // Basic + + { + da = remap(da, 0, 1, -_DissolveEdgeWidth, 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise * 0.998 + 0.001); + //noise = remap(noise, 0, 1, _DissolveEdgeWidth, 1 - _DissolveEdgeWidth); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(da + _DissolveEdgeWidth, da, noise) * (1 - dissolveAlpha); + } + else if (_DissolveType == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(_DissolveEndPoint - _DissolveStartPoint); + currentPos = lerp(_DissolveStartPoint, _DissolveEndPoint, dissolveAlpha); + + UNITY_BRANCH + if (_DissolveP2PWorldLocal != 1) + { + float3 pos = _DissolveP2PWorldLocal == 0 ? poiMesh.localPos.rgb : poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(_DissolveP2PEdgeLength + .00001, 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveHueShiftEnabled) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, _DissolveHueShift + _Time.x * _DissolveHueShiftSpeed); + } + #endif + + poiFragData.alpha = lerp(poiFragData.alpha, dissolveToTexture.a, dissolveAlpha * .999999); + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + poiFragData.baseColor = lerp(poiFragData.baseColor, dissolveToTexture.rgb, dissolveAlpha * .999999); + + UNITY_BRANCH + if (_DissolveEdgeWidth) + { + edgeColor = tex2D(_DissolveEdgeGradient, poiUV(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient_ST)) * float4(poiThemeColor(poiMods, _DissolveEdgeColor.rgb, _DissolveEdgeColorThemeIndex), _DissolveEdgeColor.a); + #ifndef POI_SHADOW + UNITY_BRANCH + if (_DissolveEdgeHueShiftEnabled) + { + edgeColor.rgb = hueShift(edgeColor.rgb, _DissolveEdgeHueShift + _Time.x * _DissolveEdgeHueShiftSpeed); + } + #endif + poiFragData.baseColor = lerp(poiFragData.baseColor, edgeColor.rgb, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + } + + poiFragData.emission += lerp(0, dissolveToTexture * _DissolveToEmissionStrength, dissolveAlpha) + lerp(0, edgeColor.rgb * _DissolveEdgeEmission, smoothstep(0, 1 - _DissolveEdgeHardness * .99999999999, edgeAlpha)); + #endif + } + #endif + + /* + Liltoon made most of this and it looked really good so I modified it to be a little more poi + + MIT License + + Copyright (c) 2020-2021 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. + */ + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods) + { + float2 uv = poiMesh.uv[_ALDecalUV]; + float2 decalCenter = _ALUVPosition; + float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1)); + + // Mask + float4 audioLinkMask = 1.0; + + // UV + float2 aluv = uv; + if (_ALDecalUVMode == 1) + { + float2 uvdir = uv * 2 - 1; + aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI); + aluv.y = length(uvdir); + } + + // Scale / Offset / Step + float maskY = aluv.y; + if (_ALDecalUVMode == 1) + { + maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1); + } + float maskX = aluv.x; + if (_ALDecalUVMode == 1) + { + maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1); + } + + float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY; + float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX; + + // Copy + audioLinkMask.r = maskVolume; + audioLinkMask.g = maskBand; + + // Clip + audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b; + audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b; + + // Shape Clip + if (_ALDecalShapeClip) + { + float volumeth = _ALDecalShapeClipVolumeWidth; + if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b; + + float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth; + float bandth = 1.0 - bandwidth; + if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b; + } + + // AudioLink + float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0); + audioLinkUV.y *= 0.0625; + float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV); + float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g); + float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0; + audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b; + //clip(audioLinkValue - .5); + + if (!poiMods.audioLinkAvailable) + { + audioLinkValue = 0; + } + + float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb; + float volumeColorSrc = audioLinkMask.g; + if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r; + if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal; + + float3 volumeColor = lerp(_ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorMid.rgb, saturate(volumeColorSrc * 2)); + volumeColor = lerp(volumeColor, _ALDecalVolumeColorHigh.rgb, saturate(volumeColorSrc * 2 - 1)); + + float3 emissionColor = lerp(_ALDecalVolumeColorLow.rgb * _ALDecalLowEmission, _ALDecalVolumeColorMid.rgb * _ALDecalMidEmission, saturate(volumeColorSrc * 2)); + emissionColor = lerp(emissionColor, _ALDecalVolumeColorHigh.rgb * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1)); + + //poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue); + #if defined(POI_PASS_BASE) || defined(POI_PASS_ADD) + poiFragData.emission += emissionColor * audioLinkValue; + poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue)); + #endif + poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha); + } + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + + void applyFlipbook(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods) + { + float4 flipBookPixel = float4(0, 0, 0, 0); + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + float flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[_FlipbookMaskUV], _FlipbookMaskPan).r; + #else + float flipBookMask = 1; + #endif + float4 flipbookScaleOffset = _FlipbookScaleOffset; + + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookScaleOffset.xy += lerp(_AudioLinkFlipbookScale.xy, _AudioLinkFlipbookScale.zw, poiMods.audioLink[_AudioLinkFlipbookScaleBand]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[_FlipbookTexArrayUV]); + float theta = radians(_FlipbookRotation + _Time.z * _FlipbookRotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + float4 sideOffset = float4(-_FlipbookSideOffset.x, _FlipbookSideOffset.y, -_FlipbookSideOffset.z, _FlipbookSideOffset.w); + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.xz, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw + sideOffset.yw, float2(0, 0), float2(1, 1)); + + UNITY_BRANCH + if (_FlipbookTiled == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(_FlipbookCurrentFrame, _FlipbookTotalFrames); + if (_FlipbookCurrentFrame < 0) + { + currentFrame = (_Time.y / (1 / _FlipbookFPS)) % _FlipbookTotalFrames; + } + #ifdef COLOR_GRADING_LOG_VIEW + if (_FlipbookChronotensityEnabled) + { + currentFrame = (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(0, _FlipbookChronotensityBand)) % (_FlipbookChronotensitySpeed * 1000000)) / (_FlipbookChronotensitySpeed * 1000000.0) * _FlipbookTotalFrames; + + } + //currentFrame += lerp(_AudioLinkFlipbookFrame.x, _AudioLinkFlipbookFrame.y, poiMods.audioLink[_AudioLinkFlipbookFrameBand]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor(currentFrame))); + UNITY_BRANCH + if (_FlipbookCrossfadeEnabled) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * _FlipbookTexArrayPan, floor((currentFrame + 1) % _FlipbookTotalFrames))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(_FlipbookCrossfadeRange.x, _FlipbookCrossfadeRange.y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + UNITY_BRANCH + if (_FlipbookIntensityControlsAlpha) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + UNITY_BRANCH + if (_FlipbookColorReplaces) + { + flipBookPixel.rgb = poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + else + { + flipBookPixel.rgb *= poiThemeColor(poiMods, _FlipbookColor.rgb, _FlipbookColorThemeIndex); + } + + #ifdef POI_BLACKLIGHT + UNITY_BRANCH + if (_BlackLightMaskFlipbook != 4) + { + flipBookMask *= blackLightMask[_BlackLightMaskFlipbook]; + } + #endif + + UNITY_BRANCH + if (_FlipbookHueShiftEnabled) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, _FlipbookHueShift + _Time.x * _FlipbookHueShiftSpeed); + } + half flipbookAlpha = 1; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookAlpha = saturate(lerp(_AudioLinkFlipbookAlpha.x, _AudioLinkFlipbookAlpha.y, poiMods.audioLink[_AudioLinkFlipbookAlphaBand])); + #endif + + #if !defined(POI_PASS_OUTLINE) && !defined(UNITY_PASS_SHADOWCASTER) + + poiFragData.baseColor = lerp(poiFragData.baseColor, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * _FlipbookReplace * flipBookMask * flipbookAlpha); + poiFragData.baseColor = poiFragData.baseColor + flipBookPixel.rgb * _FlipbookAdd * flipBookMask * flipbookAlpha; + poiFragData.baseColor = poiFragData.baseColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * _FlipbookColor.a * flipBookMask * _FlipbookMultiply * flipbookAlpha); + + float flipbookEmissionStrength = _FlipbookEmissionStrength; + #ifdef COLOR_GRADING_LOG_VIEW + //flipbookEmissionStrength += max(lerp(_AudioLinkFlipbookEmission.x, _AudioLinkFlipbookEmission.y, poiMods.audioLink[_AudioLinkFlipbookEmissionBand]), 0); + #endif + + poiFragData.emission += lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * _FlipbookColor.a * flipBookMask * flipbookAlpha); + + #endif + + UNITY_BRANCH + if (_FlipbookAlphaControlsFinalAlpha) + { + poiFragData.alpha = lerp(poiFragData.alpha, flipBookPixel.a * _FlipbookColor.a, flipBookMask); + } + } + + #endif + + #ifdef POI_MIRROR + void applyMirror(inout PoiFragData poiFragData, in PoiMesh poiMesh) + { + bool inMirror = IsInMirror(); + if (_Mirror != 0) + { + if (_Mirror == 1 && inMirror) return; + if (_Mirror == 1 && !inMirror) discard; + if (_Mirror == 2 && inMirror) discard; + if (_Mirror == 2 && !inMirror) return; + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + if(inMirror) + { + poiFragData.baseColor = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[_MirrorTextureUV], _MirrorTexturePan); + } + #endif + #endif + } + #endif + + #ifdef GRAIN + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / UNITY_MATRIX_P._34 + B); + } + + void applyDepthFX(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiMods poiMods) + { + float3 touchEmission = 0; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = poiCam.worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if (z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + //poiFragData.finalColor = diff; + + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + float depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiUV(poiMesh.uv[_DepthMaskUV], _DepthMask_ST), _DepthMaskPan).r; + #else + float depthMask = 1; + #endif + + if (_DepthColorToggle) + { + float colorBlendAlpha = lerp(_DepthColorMinValue, _DepthColorMaxValue, remapClamped(_DepthColorMinDepth, _DepthColorMaxDepth, diff)); + + #if defined(PROP_DEPTHTEXTURE) || !defined(OPTIMIZER_ENABLED) + float3 depthColor = POI2D_SAMPLER_PAN(_DepthTexture, _MainTex, poiUV(poiMesh.uv[_DepthTextureUV], _DepthTexture_ST), _DepthTexturePan).rgb * poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #else + float3 depthColor = poiThemeColor(poiMods, _DepthColor, _DepthColorThemeIndex); + #endif + + switch(_DepthColorBlendMode) + { + case 0: + { + poiFragData.finalColor = lerp(poiFragData.finalColor, depthColor, colorBlendAlpha * depthMask); + break; + } + case 1: + { + poiFragData.finalColor *= lerp(1, depthColor, colorBlendAlpha * depthMask); + break; + } + case 2: + { + poiFragData.finalColor = saturate(poiFragData.finalColor + lerp(0, depthColor, colorBlendAlpha * depthMask)); + break; + } + } + poiFragData.emission += depthColor * colorBlendAlpha * _DepthEmissionStrength * depthMask; + } + + if (_DepthAlphaToggle) + { + poiFragData.alpha *= lerp(poiFragData.alpha, saturate(lerp(_DepthAlphaMinValue, _DepthAlphaMaxValue, remapClamped(_DepthAlphaMinDepth, _DepthAlphaMaxDepth, diff))), depthMask); + } + } + #endif + + float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target + { + #ifdef GRAIN + clip(-1); + return 0; + #endif + + UNITY_SETUP_INSTANCE_ID(i); + PoiMesh poiMesh; + PoiInitStruct(PoiMesh, poiMesh); + + PoiLight poiLight; + PoiInitStruct(PoiLight, poiLight); + + PoiVertexLights poiVertexLights; + PoiInitStruct(PoiVertexLights, poiVertexLights); + + PoiCam poiCam; + PoiInitStruct(PoiCam, poiCam); + + PoiMods poiMods; + PoiInitStruct(PoiMods, poiMods); + + PoiFragData poiFragData; + poiFragData.emission = 0; + poiFragData.baseColor = float3(0, 0, 0); + poiFragData.finalColor = float3(0, 0, 0); + poiFragData.alpha = 1; + + // Mesh Data + poiMesh.objectPosition = i.objectPos; + poiMesh.objNormal = i.objNormal; + poiMesh.normals[0] = i.normal; + poiMesh.tangent = i.tangent; + poiMesh.binormal = i.binormal; + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.vertexColor = i.vertexColor; + poiMesh.isFrontFace = facing; + + #ifndef POI_PASS_OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiCam.viewDir = !IsOrthographicCamera() ? normalize(_WorldSpaceCameraPos - i.worldPos.xyz) : normalize(UNITY_MATRIX_I_V._m02_m12_m22); + float3 tanToWorld0 = float3(i.tangent.x, i.binormal.x, i.normal.x); + float3 tanToWorld1 = float3(i.tangent.y, i.binormal.y, i.normal.y); + float3 tanToWorld2 = float3(i.tangent.z, i.binormal.z, i.normal.z); + float3 ase_tanViewDir = tanToWorld0 * poiCam.viewDir.x + tanToWorld1 * poiCam.viewDir.y + tanToWorld2 * poiCam.viewDir.z; + poiCam.tangentViewDir = normalize(ase_tanViewDir); + + // 0-3 UV0-UV3 + // 4 Panosphere UV + // 5 world pos xz + // 6 Polar UV + // 6 Distorted UV + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.parallaxUV = poiCam.tangentViewDir.xy / max(poiCam.tangentViewDir.z, 0.0001); + poiMesh.uv[0] = i.uv[0]; + poiMesh.uv[1] = i.uv[1]; + poiMesh.uv[2] = i.uv[2]; + poiMesh.uv[3] = i.uv[3]; + poiMesh.uv[4] = poiMesh.uv[0]; + poiMesh.uv[5] = poiMesh.worldPos.xz; + poiMesh.uv[6] = poiMesh.uv[0]; + poiMesh.uv[7] = poiMesh.uv[0]; + + poiMesh.uv[4] = calculatePanosphereUV(poiMesh); + poiMesh.uv[6] = calculatePolarCoordinate(poiMesh); + #ifdef USER_LUT + poiMesh.uv[7] = distortedUV(poiMesh); + #endif + /* + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + poiMesh[8] = half2(dot(worldViewRight, poiMesh.normals[_MatcapNormal]), dot(worldViewUp, poiMesh.normals[_MatcapNormal])) * _MatcapBorder + 0.5; + */ + + #ifdef POI_PARALLAX + #ifndef POI_PASS_OUTLINE + //return frac(i.tangentViewDir.x); + //return float4(i.binormal.xyz,1); + applyParallax(poiMesh, poiLight, poiCam); + #endif + #endif + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, poiUV(poiMesh.uv[_MainTexUV].xy, _MainTex_ST) + _Time.x * _MainTexPan); + + float3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiUV(poiMesh.uv[_BumpMapUV], _BumpMap_ST), _BumpMapPan), _BumpScale); + poiMesh.tangentSpaceNormal = mainNormal; + + #if defined(FINALPASS) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + ApplyDetailNormal(poiMods, poiMesh); + #endif + + #if defined(GEOM_TYPE_MESH) && defined(VIGNETTE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(POI_PASS_OUTLINE) + calculateRGBNormals(poiMesh); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + // I'm just testing this because it makes it the same as if there is no normal map in the slot + float3 fancyNormal = UnpackNormal(float4(0.5, 0.5, 1, 1)); + poiMesh.normals[0] = normalize( + fancyNormal.x * poiMesh.tangent.xyz + + fancyNormal.y * poiMesh.binormal + + fancyNormal.z * poiMesh.normals[0] + ); + + // Camera data + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + //poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.vDotN = abs(dot(poiCam.viewDir, poiMesh.normals[1])); + poiCam.clipPos = i.pos; + poiCam.worldDirection = i.worldDirection; + + #ifdef COLOR_GRADING_LOG_VIEW + SetupAudioLink(poiFragData, poiMods, poiMesh); + #endif + + #ifdef POI_UDIMDISCARD + applyUDIMDiscard(poiFragData, poiMesh); + #endif + + poiFragData.baseColor = mainTexture.rgb * poiThemeColor(poiMods, _Color.rgb, _ColorThemeIndex); + poiFragData.alpha = mainTexture.a * _Color.a; + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiUV(poiMesh.uv[_MainColorAdjustTextureUV], _MainColorAdjustTexture_ST), _MainColorAdjustTexturePan); + #else + float4 hueShiftAlpha = 1; + #endif + + if (_MainHueShiftToggle) + { + float shift = _MainHueShift; + #ifdef COLOR_GRADING_LOG_VIEW + //UNITY_BRANCH + if (poiMods.audioLinkAvailable && _MainHueALCTEnabled) + { + shift += AudioLinkGetChronoTime(_MainALHueShiftCTIndex, _MainALHueShiftBand) * _MainHueALMotionSpeed; + } + #endif + if (_MainHueShiftReplace) + { + poiFragData.baseColor = lerp(poiFragData.baseColor, hueShift(poiFragData.baseColor, shift + _MainHueShiftSpeed * _Time.x), hueShiftAlpha.r); + } + else + { + poiFragData.baseColor = hueShift(poiFragData.baseColor, frac((shift - (1 - hueShiftAlpha.r) + _MainHueShiftSpeed * _Time.x))); + } + } + poiFragData.baseColor = lerp(poiFragData.baseColor, dot(poiFragData.baseColor, float3(0.3, 0.59, 0.11)), -_Saturation * hueShiftAlpha.b); + poiFragData.baseColor = saturate(poiFragData.baseColor + _MainBrightness * hueShiftAlpha.g); + #endif + + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + float alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiUV(poiMesh.uv[_ClippingMaskUV], _ClippingMask_ST), _ClippingMaskPan).r; + if (_Inverse_Clipping) + { + alphaMask = 1 - alphaMask; + } + #else + float alphaMask = 1; + #endif + + poiFragData.alpha *= alphaMask; + + applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods); + + applyVertexColor(poiFragData, poiMesh); + + #ifdef POI_BACKFACE + ApplyBackFaceColor(poiFragData, poiMesh, poiMods); + #endif + + #ifdef DISTORT + applyDissolve(poiFragData, poiMesh, poiMods); + #endif + + #ifdef COLOR_GRADING_LOG_VIEW + #ifdef POI_AL_DECAL + ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods); + #endif + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + applyFlipbook(poiFragData, poiMesh, poiMods); + #endif + + #ifdef POI_MIRROR + applyMirror(poiFragData, poiMesh); + #endif + + poiFragData.finalColor = poiFragData.baseColor; + + #ifdef GRAIN + applyDepthFX(poiFragData, poiCam, poiMesh, poiMods); + #endif + + //UNITY_BRANCH + if (_IgnoreFog == 0) + { + UNITY_APPLY_FOG(i.fogCoord, poiFragData.finalColor); + } + + //#ifndef UNITY_PASS_SHADOWCASTER + if (_Mode == POI_MODE_OPAQUE) + { + poiFragData.alpha = 1; + } + + if (_Mode == 1) + { + clip(poiFragData.alpha - _Cutoff); + } + + if (_Mode == POI_MODE_FADE) + { + clip(poiFragData.alpha -= 0.01); + } + + return float4(poiFragData.finalColor + poiFragData.emission, poiFragData.alpha) + mainTexture * 0.0001; + //#else + // SHADOW_CASTER_FRAGMENT(i) + //#endif + + } + + ENDCG + + } + + } + CustomEditor "Thry.ShaderEditor" +} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader.meta new file mode 100644 index 00000000..7d0e0517 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/Poiyomi Pro.shader.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 231d95ff7213dd74f82af136b256fb32 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + nonModifiableTextures: + - _ClothDFG: {fileID: 2800000, guid: 76d65cbce584df7449699fb8406f60ea, type: 3} + - _SkinLUT: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3} + - _ToonRamp: {fileID: 2800000, guid: 61bd594533da4fc42bd46ef93ba5a4f6, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity new file mode 100644 index 00000000..2d0152f0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity @@ -0,0 +1,2631 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.18028447, g: 0.2257151, b: 0.30692357, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &185318362 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 185318363} + - component: {fileID: 185318365} + - component: {fileID: 185318364} + m_Layer: 0 + m_Name: Cube_ProOutline (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &185318363 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185318362} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.75, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &185318364 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185318362} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8880288ed7295e04d8e1ab2cfc47dfc4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &185318365 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185318362} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &312175352 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 312175355} + - component: {fileID: 312175354} + - component: {fileID: 312175353} + m_Layer: 0 + m_Name: Plane (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &312175353 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312175352} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0c6e9f9c3c33874408623ee63ca38df6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &312175354 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312175352} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &312175355 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312175352} + m_LocalRotation: {x: 0.09941454, y: 0.8646031, z: -0.48755884, w: 0.069747105} + m_LocalPosition: {x: -4.0252, y: 2.95, z: -2.86} + m_LocalScale: {x: 0.31516, y: 0.31516, z: 0.31516} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 18 + m_LocalEulerAnglesHint: {x: 58.977, y: 177.36801, z: 11.63} +--- !u!1 &339776497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 339776498} + - component: {fileID: 339776500} + - component: {fileID: 339776499} + m_Layer: 0 + m_Name: Cube_Pro (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &339776498 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339776497} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.25, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &339776499 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339776497} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 267e1b316da597347bc70350979e0e7d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &339776500 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339776497} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &467852497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 467852500} + - component: {fileID: 467852499} + - component: {fileID: 467852498} + m_Layer: 0 + m_Name: Cube_ProOutlineEarly + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &467852498 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 467852497} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6308df3a90036fc419866514a1a4ea0a, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &467852499 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 467852497} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &467852500 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 467852497} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &471637540 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 471637541} + - component: {fileID: 471637543} + - component: {fileID: 471637542} + m_Layer: 0 + m_Name: Sphere_Outline (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &471637541 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 471637540} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.75, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &471637542 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 471637540} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8880288ed7295e04d8e1ab2cfc47dfc4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &471637543 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 471637540} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &483500482 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 483500485} + - component: {fileID: 483500484} + - component: {fileID: 483500483} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &483500483 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483500482} + m_Enabled: 1 +--- !u!20 &483500484 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483500482} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &483500485 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483500482} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &514146592 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 514146595} + - component: {fileID: 514146594} + - component: {fileID: 514146593} + m_Layer: 0 + m_Name: Sphere_OutlineEarly + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &514146593 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 514146592} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6308df3a90036fc419866514a1a4ea0a, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &514146594 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 514146592} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &514146595 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 514146592} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &651018172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 651018176} + - component: {fileID: 651018175} + - component: {fileID: 651018174} + - component: {fileID: 651018173} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!135 &651018173 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 651018172} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &651018174 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 651018172} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a37676c0ca73c284b85c273c76f95b26, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &651018175 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 651018172} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &651018176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 651018172} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.884, y: 1.897, z: -3.346} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &748635984 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1266952375325646197, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 2806451537506239328, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 4620176569628777126, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 4646563606431449812, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 5030950332166494907, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_RootOrder + value: 17 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.708 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalPosition.z + value: -3.344 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851631681429430303, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6109189203970633561, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 6250879183438251914, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: unityVersion + value: 2019.4.31f1 + objectReference: {fileID: 0} + - target: {fileID: 6250879183438251915, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: blueprintId + value: avtr_f848cca5-e9e5-43d4-b1cf-e8e239c14a4a + objectReference: {fileID: 0} + - target: {fileID: 6250879183438251915, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: fallbackStatus + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6520927135986989733, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_Name + value: Suzu + objectReference: {fileID: 0} + - target: {fileID: 6895857037355151551, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 7221529081178765775, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 7750326895892482013, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + - target: {fileID: 8457931790408626746, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + propertyPath: m_ProbeAnchor + value: + objectReference: {fileID: 748635985} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 267b20e354307164aaea2beefb92c23a, type: 3} +--- !u!4 &748635985 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6226162529230617465, guid: 267b20e354307164aaea2beefb92c23a, + type: 3} + m_PrefabInstance: {fileID: 748635984} + m_PrefabAsset: {fileID: 0} +--- !u!1 &813662969 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 813662970} + - component: {fileID: 813662972} + - component: {fileID: 813662971} + m_Layer: 0 + m_Name: Cube_ProGrabPass (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &813662970 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 813662969} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.25, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &813662971 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 813662969} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d40a27cc65267349882f18732ef7026, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &813662972 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 813662969} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &882581584 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 882581585} + - component: {fileID: 882581588} + - component: {fileID: 882581587} + - component: {fileID: 882581586} + m_Layer: 0 + m_Name: Plane (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &882581585 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882581584} + m_LocalRotation: {x: 0, y: 0.7071068, z: -0.7071068, w: 0} + m_LocalPosition: {x: 0, y: 5, z: 2.258} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: 0} +--- !u!64 &882581586 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882581584} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &882581587 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882581584} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7303f74de3f3d644bae9e7d8952093be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &882581588 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882581584} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &905377141 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 905377144} + - component: {fileID: 905377143} + - component: {fileID: 905377142} + m_Layer: 0 + m_Name: Sphere_GrabPass + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &905377142 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 905377141} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d40a27cc65267349882f18732ef7026, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &905377143 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 905377141} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &905377144 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 905377141} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.5, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &966853371 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 966853372} + - component: {fileID: 966853374} + - component: {fileID: 966853373} + m_Layer: 0 + m_Name: Sphere_GrabPass (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &966853372 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966853371} + m_LocalRotation: {x: -0, y: -0.08414928, z: -0, w: 0.99645317} + m_LocalPosition: {x: 2.25, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: -9.654, z: 0} +--- !u!23 &966853373 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966853371} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d40a27cc65267349882f18732ef7026, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &966853374 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966853371} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1031971044 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1031971045} + - component: {fileID: 1031971047} + - component: {fileID: 1031971046} + m_Layer: 0 + m_Name: Cube_ProOutlineEarly (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1031971045 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031971044} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.75, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1031971046 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031971044} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6308df3a90036fc419866514a1a4ea0a, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1031971047 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031971044} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1223006239 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8800328339556915021, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_Name + value: AudioLinkAvatar + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_RootOrder + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalPosition.y + value: 10000000 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328339556915023, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8800328340110197116, guid: 6e8e0ee5a3655884ea49447ae9e6e665, + type: 3} + propertyPath: m_audioClip + value: + objectReference: {fileID: 8300000, guid: d73f926f1a78fcd4f84602d883b5a16e, type: 3} + m_RemovedComponents: + - {fileID: 5395514806221558607, guid: 6e8e0ee5a3655884ea49447ae9e6e665, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 6e8e0ee5a3655884ea49447ae9e6e665, type: 3} +--- !u!1 &1227424172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1227424175} + - component: {fileID: 1227424174} + - component: {fileID: 1227424173} + m_Layer: 0 + m_Name: Cube_ProOutline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1227424173 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227424172} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8880288ed7295e04d8e1ab2cfc47dfc4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1227424174 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227424172} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1227424175 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227424172} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.5, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1438243043 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1438243044} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1438243044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438243043} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 12.94, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1652809462} + - {fileID: 471637541} + - {fileID: 1915956592} + - {fileID: 966853372} + - {fileID: 2036037711} + - {fileID: 339776498} + - {fileID: 185318363} + - {fileID: 1031971045} + - {fileID: 813662970} + - {fileID: 2120383745} + - {fileID: 882581585} + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1558014558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1558014562} + - component: {fileID: 1558014561} + - component: {fileID: 1558014560} + m_Layer: 0 + m_Name: Plane (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1558014560 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1558014558} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3614bbe9905f70f4fa1912bc93f56f71, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1558014561 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1558014558} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1558014562 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1558014558} + m_LocalRotation: {x: 0.03432776, y: 0.99659973, z: -0.07394837, w: -0.011928806} + m_LocalPosition: {x: -4.37, y: 2.95, z: -2.86} + m_LocalScale: {x: 0.31516, y: 0.31516, z: 0.31516} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 8.428, y: 181.67099, z: 4.0690002} +--- !u!1 &1635472639 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1635472641} + - component: {fileID: 1635472640} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1635472640 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1635472639} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1635472641 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1635472639} + m_LocalRotation: {x: 0.41585442, y: -0.16149908, z: 0.07530812, w: 0.8918026} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50.000004, y: -20.529001, z: 0} +--- !u!1 &1639219717 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1639219720} + - component: {fileID: 1639219719} + - component: {fileID: 1639219718} + m_Layer: 0 + m_Name: Sphere_Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1639219718 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1639219717} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8880288ed7295e04d8e1ab2cfc47dfc4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1639219719 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1639219717} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1639219720 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1639219717} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.5, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1652809461 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1652809462} + - component: {fileID: 1652809464} + - component: {fileID: 1652809463} + m_Layer: 0 + m_Name: Sphere_Pro (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1652809462 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1652809461} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.25, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1652809463 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1652809461} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 267e1b316da597347bc70350979e0e7d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1652809464 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1652809461} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1757573844 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1757573847} + - component: {fileID: 1757573846} + - component: {fileID: 1757573845} + m_Layer: 0 + m_Name: Cube_ProGrabPass + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1757573845 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757573844} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d40a27cc65267349882f18732ef7026, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1757573846 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757573844} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1757573847 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1757573844} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.5, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1787406558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1787406561} + - component: {fileID: 1787406560} + - component: {fileID: 1787406559} + m_Layer: 0 + m_Name: Sphere_Pro + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1787406559 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787406558} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 267e1b316da597347bc70350979e0e7d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1787406560 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787406558} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1787406561 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787406558} + m_LocalRotation: {x: 0.93445194, y: -0.09925147, z: -0.33434823, w: -0.07183299} + m_LocalPosition: {x: 0, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: -11.573001, y: 218.556, z: 188.066} +--- !u!1 &1915956591 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1915956592} + - component: {fileID: 1915956594} + - component: {fileID: 1915956593} + m_Layer: 0 + m_Name: Sphere_OutlineEarly (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1915956592 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915956591} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.75, y: 2.281, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1915956593 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915956591} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6308df3a90036fc419866514a1a4ea0a, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1915956594 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915956591} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1925488418 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1925488422} + - component: {fileID: 1925488421} + - component: {fileID: 1925488420} + - component: {fileID: 1925488419} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &1925488419 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925488418} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1925488420 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925488418} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7303f74de3f3d644bae9e7d8952093be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1925488421 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925488418} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1925488422 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925488418} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 2.25, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!1 &1970176517 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1970176520} + - component: {fileID: 1970176519} + - component: {fileID: 1970176518} + m_Layer: 0 + m_Name: Cube_Pro + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1970176518 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970176517} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 267e1b316da597347bc70350979e0e7d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1970176519 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970176517} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1970176520 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970176517} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1987781279 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1987781283} + - component: {fileID: 1987781282} + - component: {fileID: 1987781281} + - component: {fileID: 1987781280} + m_Layer: 0 + m_Name: Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &1987781280 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987781279} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1987781281 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987781279} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a59d49529a0bfa94f8e9d47ee26206ee, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1987781282 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987781279} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1987781283 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987781279} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.70710677} + m_LocalPosition: {x: -9.954, y: 0, z: 10.213} + m_LocalScale: {x: 2.6271, y: 2.6271, z: 2.6271} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: 0} +--- !u!1 &2036037710 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2036037711} + - component: {fileID: 2036037714} + - component: {fileID: 2036037713} + - component: {fileID: 2036037712} + m_Layer: 0 + m_Name: Plane (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2036037711 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036037710} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!64 &2036037712 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036037710} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2036037713 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036037710} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7303f74de3f3d644bae9e7d8952093be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &2036037714 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036037710} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2120383744 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2120383745} + - component: {fileID: 2120383746} + m_Layer: 0 + m_Name: Point Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2120383745 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2120383744} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 2.76, z: -0.88} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1438243044} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &2120383746 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2120383744} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 10 + m_Range: 3.9435892 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &2146645979 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2146645983} + - component: {fileID: 2146645982} + - component: {fileID: 2146645981} + - component: {fileID: 2146645980} + m_Layer: 0 + m_Name: Plane (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &2146645980 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146645979} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2146645981 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146645979} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7303f74de3f3d644bae9e7d8952093be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &2146645982 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146645979} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2146645983 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2146645979} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0.7071068, w: 0} + m_LocalPosition: {x: 2.25, y: 5, z: 2.25} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: 0} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity.meta new file mode 100644 index 00000000..38a060bf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/ModularShader/TestScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5278e36bab4a294bbd79c5ac2e5186f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets.meta new file mode 100644 index 00000000..50c7cb1b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff8d3b136c831ac42a0c97ca28673d59 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting.meta new file mode 100644 index 00000000..e3222712 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a883d2a7e12958488b5e3e3b40000ad +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat new file mode 100644 index 00000000..6f0ca2f4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat @@ -0,0 +1,1586 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_Lighting_FullUTS + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_REALISTIC + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _LightingAdditiveGradientEnd_isPreset: true + _LightingAdditiveGradientStart_isPreset: true + _LightingAdditivePassthrough_isPreset: true + _LightingAdditiveType_isPreset: true + _LightingCapEnabled_isPreset: true + _LightingCap_isPreset: true + _LightingColorMode_isPreset: true + _LightingMinLightBrightness_isPreset: true + isPreset: true + presetName: Lighting/Full UTS2 + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 1 + - _LightingAdditiveGradientStart: 1 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 1 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 2 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 1 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 1 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.6981132, g: 0.6981132, b: 0.6981132, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat.meta new file mode 100644 index 00000000..edbffbec --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_FullUTS.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b3ea4f0c69d93b14ca1f17342c9502fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat new file mode 100644 index 00000000..6ccf78f0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat @@ -0,0 +1,1557 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_Lighting_HardToon + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_MATHRAMP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _LightingAdditiveGradientEnd_isPreset: true + _LightingAdditiveGradientStart_isPreset: true + _LightingAdditiveType_isPreset: true + _LightingGradientEnd_isPreset: true + _LightingGradientStart_isPreset: true + _LightingMode_isPreset: true + _ShadingShadeMapBlendType_isPreset: true + _ShadowStrength_isPreset: true + isPreset: true + presetName: Lighting/Toon Hard Shadow + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0.5 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0.5 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 1 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat.meta new file mode 100644 index 00000000..28297350 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_HardToon.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b84dedf1d78543840bd79dea015df1bc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat new file mode 100644 index 00000000..312739f4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat @@ -0,0 +1,1557 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_Lighting_Poi+UTS + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_REALISTIC + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _LightingAdditiveGradientEnd_isPreset: true + _LightingAdditiveGradientStart_isPreset: true + _LightingAdditivePassthrough_isPreset: true + _LightingAdditiveType_isPreset: true + _LightingCapEnabled_isPreset: true + _LightingCap_isPreset: true + _LightingColorMode_isPreset: true + _LightingMinLightBrightness_isPreset: true + isPreset: true + presetName: Lighting/Poi + UTS + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 1 + - _LightingAdditiveGradientStart: 1 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 1 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 1 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 1 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.6981132, g: 0.6981132, b: 0.6981132, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat.meta new file mode 100644 index 00000000..77824184 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Poi+UTS.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c217de26cf5d2494f85ee3e9199eacaf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat new file mode 100644 index 00000000..bb33b0e9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat @@ -0,0 +1,1583 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_Lighting_Realistic + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_REALISTIC + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _LightingAdditiveType_isPreset: true + _LightingCastedShadows_isPreset: true + _LightingIndirectUsesNormals_isPreset: true + _LightingMode_isPreset: true + _LightingStandardSmoothness_isPreset: true + isPreset: true + presetName: Lighting/Realistic + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothDFG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClothMetallicSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AlphasharpenedA2C: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkDissolveAlphaBand: 0 + - _AudioLinkDissolveDetailBand: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ClothLerp: 0 + - _ClothMetallic: 0 + - _ClothMetallicSmoothnessMapInvert: 0 + - _ClothMetallicSmoothnessMapUV: 0 + - _ClothReflectance: 0.5 + - _ClothSmoothness: 0.5 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal0MaskChannel: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal1MaskChannel: 1 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal2MaskChannel: 2 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _Decal3MaskChannel: 3 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDissolveAudioLink: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStepsMax: 128 + - _HeightStepsMin: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0.5 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditiveMonochromatic: 0 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 0 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 1 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0.5 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 1 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMinLightIndiBrightness: 0 + - _LightingMode: 6 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveAlpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDissolveDetail: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClothMetallicSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat.meta new file mode 100644 index 00000000..e0e1e56b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/MP_Lighting_Realistic.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c307c1f8bf70e944e83e2db5de65c395 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat new file mode 100644 index 00000000..2da68ccd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat @@ -0,0 +1,1547 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 0 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 1 + - m_start_PoiShading: 1 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 0 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat.meta new file mode 100644 index 00000000..e1fc5a69 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Lighting/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93fa3d1f114badc4abd0d7ec1d6db701 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular.meta new file mode 100644 index 00000000..65433c4a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b783313f0e6828e4d8f13664c3fcb7da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat new file mode 100644 index 00000000..d99081fa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat @@ -0,0 +1,1554 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_DullMetal + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _MochieMetallicMultiplier_isPreset: true + _MochieReflectionStrength_isPreset: true + _MochieRoughnessMultiplier_isPreset: true + _MochieSpecularStrength_isPreset: true + isPreset: true + m_start_brdf_isPreset: true + presetName: Reflections & Specular/Dull Metal + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 1 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 1 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat.meta new file mode 100644 index 00000000..e74c38e0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullMetal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0b07d0f5c9e63d4189a75dbee169fe2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat new file mode 100644 index 00000000..0d2ab5af --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat @@ -0,0 +1,1554 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_DullNonMetal + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _MochieMetallicMultiplier_isPreset: true + _MochieReflectionStrength_isPreset: true + _MochieRoughnessMultiplier_isPreset: true + _MochieSpecularStrength_isPreset: true + isPreset: true + m_start_brdf_isPreset: true + presetName: Reflections & Specular/Dull Non Metal + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 1 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 1 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat.meta new file mode 100644 index 00000000..26ff234c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_DullNonMetal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: be08ee4ab3bbcce4a9d6fd9b0b6d479e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat new file mode 100644 index 00000000..fccba1fa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat @@ -0,0 +1,1554 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_ShinyMetal + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _MochieMetallicMultiplier_isPreset: true + _MochieReflectionStrength_isPreset: true + _MochieRoughnessMultiplier_isPreset: true + _MochieSpecularStrength_isPreset: true + isPreset: true + m_start_brdf_isPreset: true + presetName: Reflections & Specular/Shiny Metal + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 1 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 0 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 1 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat.meta new file mode 100644 index 00000000..631724ec --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyMetal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86e8b93031be74c499a6a20411be8b0c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat new file mode 100644 index 00000000..2ed77df7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat @@ -0,0 +1,1554 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MP_ShinyNonMetal + m_Shader: {fileID: 4800000, guid: 231d95ff7213dd74f82af136b256fb32, type: 3} + m_ShaderKeywords: MOCHIE_PBR POI_LIGHT_DATA_ADDITIVE_DIRECTIONAL_ENABLE POI_LIGHT_DATA_ADDITIVE_ENABLE + POI_VERTEXLIGHT_ON VIGNETTE_MASKED _LIGHTINGMODE_FLAT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + _MochieMetallicMultiplier_isPreset: true + _MochieReflectionStrength_isPreset: true + _MochieRoughnessMultiplier_isPreset: true + _MochieSpecularStrength_isPreset: true + isPreset: true + m_start_brdf_isPreset: true + presetName: Reflections & Specular/Shiny Non Metal + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _1st_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _2nd_ShadeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AlphaTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackFaceTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BlueTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatCubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClearCoatSmoothnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ClippingMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalTexture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DepthTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveDetailNoise: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveEdgeGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveNoiseTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DissolveToTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionFlowTexture1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionScrollingCurve3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FlipbookTexArray: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlitterTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GreenTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Heightmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HighColor_Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingAOMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingDetailShadowMaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightingShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainColorAdjustTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap0NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap1NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Matcap2Mask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MatcapMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MirrorTexture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieMetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflCube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieReflectionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieRoughnessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MochieSpecularMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PPMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PathingMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RGBMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RedTexure: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RgbNormalR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimEnviroMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RimTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Set_HighColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SkinLUT: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TextGlyphs: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ToonRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _VertexManipulationHeightMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Instancing: 0 + - _1st2nd_Shades_Feather: 0.0001 + - _1stShadeMapMask_Inverse: 0 + - _1st_ShadeMapUV: 0 + - _2ndShadeMapMask_Inverse: 0 + - _2nd_ShadeMapUV: 0 + - _ALDecalBandClipMax: 1 + - _ALDecalBandClipMin: 0 + - _ALDecalBandStep: 0 + - _ALDecalBaseBoost: 5 + - _ALDecalBlendAlpha: 1 + - _ALDecalBlendType: 0 + - _ALDecalControlsAlpha: 0 + - _ALDecalHighEmission: 0 + - _ALDecalLineWidth: 1 + - _ALDecalLowEmission: 0 + - _ALDecalMidEmission: 0 + - _ALDecalShapeClip: 0 + - _ALDecalShapeClipBandWidth: 0.5 + - _ALDecalShapeClipVolumeWidth: 0.5 + - _ALDecalTrebleBoost: 1 + - _ALDecalType: 0 + - _ALDecalUV: 0 + - _ALDecalUVMode: 0 + - _ALDecalVolume: 0.5 + - _ALDecalVolumeClipMax: 1 + - _ALDecalVolumeClipMin: 0 + - _ALDecalVolumeColorSource: 1 + - _ALDecalVolumeStep: 0 + - _ALUVRotation: 0 + - _ALUVRotationSpeed: 0 + - _AlphaAngular: 0 + - _AlphaAudioLinkAddBand: 0 + - _AlphaAudioLinkEnabled: 0 + - _AlphaColorThemeIndex: 0 + - _AlphaDistanceFade: 0 + - _AlphaDistanceFadeMax: 0 + - _AlphaDistanceFadeMaxAlpha: 1 + - _AlphaDistanceFadeMin: 0 + - _AlphaDistanceFadeMinAlpha: 0 + - _AlphaDistanceFadeType: 1 + - _AlphaDitherGradient: 0.1 + - _AlphaDithering: 0 + - _AlphaForceOpaque: 0 + - _AlphaFresnel: 0 + - _AlphaFresnelAlpha: 0 + - _AlphaFresnelInvert: 0 + - _AlphaFresnelSharpness: 0.5 + - _AlphaFresnelWidth: 0.5 + - _AlphaMipScale: 0.25 + - _AlphaMod: 0 + - _AlphaPremultiply: 0 + - _AlphaSharpennedA2C: 0 + - _AlphaTextureUV: 0 + - _AlphaToCoverage: 0 + - _AngleCompareTo: 0 + - _AngleMinAlpha: 0 + - _AngleType: 0 + - _AudioLinkAnimToggle: 1 + - _AudioLinkDecal0AlphaBand: 0 + - _AudioLinkDecal0EmissionBand: 0 + - _AudioLinkDecal0RotationBand: 0 + - _AudioLinkDecal0ScaleBand: 0 + - _AudioLinkDecal1AlphaBand: 0 + - _AudioLinkDecal1EmissionBand: 0 + - _AudioLinkDecal1RotationBand: 0 + - _AudioLinkDecal1ScaleBand: 0 + - _AudioLinkDecal2AlphaBand: 0 + - _AudioLinkDecal2EmissionBand: 0 + - _AudioLinkDecal2RotationBand: 0 + - _AudioLinkDecal2ScaleBand: 0 + - _AudioLinkDecal3AlphaBand: 0 + - _AudioLinkDecal3EmissionBand: 0 + - _AudioLinkDecal3RotationBand: 0 + - _AudioLinkDecal3ScaleBand: 0 + - _AudioLinkDecal3SideBand: 0 + - _AudioLinkDecalX: 0 + - _AudioLinkEmission0CenterOutBand: 0 + - _AudioLinkEmission0CenterOutSize: 1 + - _AudioLinkEmission0CenterOutwidth: 1 + - _AudioLinkEmission1CenterOutBand: 0 + - _AudioLinkEmission1CenterOutSize: 1 + - _AudioLinkEmission1CenterOutwidth: 1 + - _AudioLinkEmission2CenterOutBand: 0 + - _AudioLinkEmission2CenterOutSize: 1 + - _AudioLinkEmission2CenterOutwidth: 1 + - _AudioLinkEmission3CenterOutBand: 0 + - _AudioLinkEmission3CenterOutSize: 1 + - _AudioLinkEmission3CenterOutwidth: 1 + - _AudioLinkHelp: 0 + - _AudioLinkPathTimeOffsetBandB: 0 + - _AudioLinkPathTimeOffsetBandG: 0 + - _AudioLinkPathTimeOffsetBandR: 0 + - _BackFaceAlpha: 1 + - _BackFaceColorThemeIndex: 0 + - _BackFaceDetailIntensity: 1 + - _BackFaceEmissionStrength: 0 + - _BackFaceEnabled: 0 + - _BackFaceHueShift: 0 + - _BackFaceHueShiftEnabled: 0 + - _BackFaceHueShiftSpeed: 0 + - _BackFaceMaskUV: 0 + - _BackFaceReplaceAlpha: 0 + - _BackFaceTextureUV: 0 + - _BaseColor_Step: 0.5 + - _BaseShade_Feather: 0.0001 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BlueColorThemeIndex: 0 + - _BlueTextureUV: 0 + - _BumpMapUV: 0 + - _BumpScale: 1 + - _CameraAngleMax: 90 + - _CameraAngleMin: 45 + - _ClearCoat: 1 + - _ClearCoatForceLighting: 0 + - _ClearCoatInvertSmoothness: 0 + - _ClearCoatMaskUV: 0 + - _ClearCoatNormal: 0 + - _ClearCoatSampleWorld: 1 + - _ClearCoatSmoothness: 0 + - _ClearCoatSmoothnessMapUV: 0 + - _ClearCoatTintThemeIndex: 0 + - _ClippingMaskUV: 0 + - _ColorMask: 15 + - _ColorThemeIndex: 0 + - _ContinuousDissolve: 0 + - _CubeMapAdd: 0 + - _CubeMapColorThemeIndex: 0 + - _CubeMapEmissionStrength: 0 + - _CubeMapEnabled: 0 + - _CubeMapHueShift: 0 + - _CubeMapHueShiftEnabled: 0 + - _CubeMapHueShiftSpeed: 0 + - _CubeMapIntensity: 1 + - _CubeMapLightMask: 0 + - _CubeMapMaskInvert: 0 + - _CubeMapMaskUV: 0 + - _CubeMapMultiply: 0 + - _CubeMapNormal: 1 + - _CubeMapReplace: 1 + - _CubeMapUVMode: 1 + - _Cull: 2 + - _CurvFix: 1 + - _CurvatureU: 0 + - _CurvatureV: 0 + - _Cutoff: 0.5 + - _DebugAutocorrelator: 0 + - _DebugBass: 0 + - _DebugCCColors: 0 + - _DebugCCLights: 0 + - _DebugCCStrip: 0 + - _DebugChronotensity: 0 + - _DebugDFT: 0 + - _DebugHighMids: 0 + - _DebugLowMids: 0 + - _DebugTreble: 0 + - _DebugVisualizerHelpbox: 0 + - _DebugWaveform: 0 + - _Decal0Depth: 0 + - _Decal0HueAngleStrength: 0 + - _Decal1Depth: 0 + - _Decal1HueAngleStrength: 0 + - _Decal2Depth: 0 + - _Decal2HueAngleStrength: 0 + - _Decal3Depth: 0 + - _Decal3HueAngleStrength: 0 + - _DecalBlendAlpha: 1 + - _DecalBlendAlpha1: 1 + - _DecalBlendAlpha2: 1 + - _DecalBlendAlpha3: 1 + - _DecalBlendType: 0 + - _DecalBlendType1: 0 + - _DecalBlendType2: 0 + - _DecalBlendType3: 0 + - _DecalColor1ThemeIndex: 0 + - _DecalColor2ThemeIndex: 0 + - _DecalColor3ThemeIndex: 0 + - _DecalColorThemeIndex: 0 + - _DecalEmissionStrength: 0 + - _DecalEmissionStrength1: 0 + - _DecalEmissionStrength2: 0 + - _DecalEmissionStrength3: 0 + - _DecalEnabled: 0 + - _DecalEnabled1: 0 + - _DecalEnabled2: 0 + - _DecalEnabled3: 0 + - _DecalHueShift: 0 + - _DecalHueShift1: 0 + - _DecalHueShift2: 0 + - _DecalHueShift3: 0 + - _DecalHueShiftEnabled: 0 + - _DecalHueShiftEnabled1: 0 + - _DecalHueShiftEnabled2: 0 + - _DecalHueShiftEnabled3: 0 + - _DecalHueShiftSpeed: 0 + - _DecalHueShiftSpeed1: 0 + - _DecalHueShiftSpeed2: 0 + - _DecalHueShiftSpeed3: 0 + - _DecalMaskUV: 0 + - _DecalOverideAlpha: 0 + - _DecalOverideAlpha1: 0 + - _DecalOverideAlpha2: 0 + - _DecalOverideAlpha3: 0 + - _DecalRotation: 0 + - _DecalRotation1: 0 + - _DecalRotation2: 0 + - _DecalRotation3: 0 + - _DecalRotationSpeed: 0 + - _DecalRotationSpeed1: 0 + - _DecalRotationSpeed2: 0 + - _DecalRotationSpeed3: 0 + - _DecalTexture1UV: 0 + - _DecalTexture2UV: 0 + - _DecalTexture3UV: 0 + - _DecalTextureUV: 0 + - _DecalTiled: 0 + - _DecalTiled1: 0 + - _DecalTiled2: 0 + - _DecalTiled3: 0 + - _DepthAlphaMaxDepth: 1 + - _DepthAlphaMaxValue: 1 + - _DepthAlphaMinDepth: 0 + - _DepthAlphaMinValue: 0 + - _DepthAlphaToggle: 0 + - _DepthColorBlendMode: 0 + - _DepthColorMaxDepth: 1 + - _DepthColorMaxValue: 1 + - _DepthColorMinDepth: 0 + - _DepthColorMinValue: 0 + - _DepthColorThemeIndex: 0 + - _DepthColorToggle: 0 + - _DepthEmissionStrength: 0 + - _DepthMaskUV: 0 + - _DepthTextureUV: 0 + - _DetailBrightness: 1 + - _DetailEnabled: 0 + - _DetailMaskUV: 0 + - _DetailNormalMapScale: 1 + - _DetailNormalMapUV: 0 + - _DetailTexIntensity: 1 + - _DetailTexUV: 0 + - _DetailTintThemeIndex: 0 + - _DisableDirectionalInAdd: 1 + - _DissolveAlpha: 0 + - _DissolveAlpha0: 0 + - _DissolveAlpha1: 0 + - _DissolveAlpha2: 0 + - _DissolveAlpha3: 0 + - _DissolveAlpha4: 0 + - _DissolveAlpha5: 0 + - _DissolveAlpha6: 0 + - _DissolveAlpha7: 0 + - _DissolveAlpha8: 0 + - _DissolveAlpha9: 0 + - _DissolveDetailNoiseUV: 0 + - _DissolveDetailStrength: 0.1 + - _DissolveEdgeColorThemeIndex: 0 + - _DissolveEdgeEmission: 0 + - _DissolveEdgeHardness: 0.5 + - _DissolveEdgeHueShift: 0 + - _DissolveEdgeHueShiftEnabled: 0 + - _DissolveEdgeHueShiftSpeed: 0 + - _DissolveEdgeWidth: 0.025 + - _DissolveHueShift: 0 + - _DissolveHueShiftEnabled: 0 + - _DissolveHueShiftSpeed: 0 + - _DissolveInvertDetailNoise: 0 + - _DissolveInvertNoise: 0 + - _DissolveMaskInvert: 0 + - _DissolveMaskUV: 0 + - _DissolveNoiseTextureUV: 0 + - _DissolveP2PEdgeLength: 0.1 + - _DissolveP2PWorldLocal: 0 + - _DissolveTextureColorThemeIndex: 0 + - _DissolveToEmissionStrength: 0 + - _DissolveToTextureUV: 0 + - _DissolveType: 1 + - _DissolveUseVertexColors: 0 + - _DistortionFlowTexture1UV: 0 + - _DistortionFlowTextureUV: 0 + - _DistortionMaskUV: 0 + - _DistortionStrength: 0.03 + - _DistortionStrength1: 0.01 + - _DistortionUvToDistort: 0 + - _DstBlend: 0 + - _EmissionAL0Enabled: 0 + - _EmissionAL0StrengthBand: 0 + - _EmissionAL1Enabled: 0 + - _EmissionAL1StrengthBand: 0 + - _EmissionAL2Enabled: 0 + - _EmissionAL2StrengthBand: 0 + - _EmissionAL3Enabled: 0 + - _EmissionAL3StrengthBand: 0 + - _EmissionBaseColorAsMap: 0 + - _EmissionBaseColorAsMap1: 0 + - _EmissionBaseColorAsMap2: 0 + - _EmissionBaseColorAsMap3: 0 + - _EmissionBlinkingEnabled: 0 + - _EmissionBlinkingEnabled1: 0 + - _EmissionBlinkingEnabled2: 0 + - _EmissionBlinkingEnabled3: 0 + - _EmissionBlinkingOffset: 0 + - _EmissionBlinkingOffset1: 0 + - _EmissionBlinkingOffset2: 0 + - _EmissionBlinkingOffset3: 0 + - _EmissionCenterOutEnabled: 0 + - _EmissionCenterOutEnabled1: 0 + - _EmissionCenterOutEnabled2: 0 + - _EmissionCenterOutEnabled3: 0 + - _EmissionCenterOutSpeed: 5 + - _EmissionCenterOutSpeed1: 5 + - _EmissionCenterOutSpeed2: 5 + - _EmissionCenterOutSpeed3: 5 + - _EmissionColor1ThemeIndex: 0 + - _EmissionColor2ThemeIndex: 0 + - _EmissionColor3ThemeIndex: 0 + - _EmissionColorThemeIndex: 0 + - _EmissionHueShift: 0 + - _EmissionHueShift1: 0 + - _EmissionHueShift2: 0 + - _EmissionHueShift3: 0 + - _EmissionHueShiftEnabled: 0 + - _EmissionHueShiftEnabled1: 0 + - _EmissionHueShiftEnabled2: 0 + - _EmissionHueShiftEnabled3: 0 + - _EmissionHueShiftSpeed: 0 + - _EmissionHueShiftSpeed1: 0 + - _EmissionHueShiftSpeed2: 0 + - _EmissionHueShiftSpeed3: 0 + - _EmissionMap1UV: 0 + - _EmissionMap2UV: 0 + - _EmissionMap3UV: 0 + - _EmissionMapUV: 0 + - _EmissionMask1UV: 0 + - _EmissionMask2UV: 0 + - _EmissionMask3UV: 0 + - _EmissionMaskUV: 0 + - _EmissionReplace0: 0 + - _EmissionReplace1: 0 + - _EmissionReplace2: 0 + - _EmissionReplace3: 0 + - _EmissionScrollingOffset: 0 + - _EmissionScrollingOffset1: 0 + - _EmissionScrollingUseCurve: 0 + - _EmissionScrollingUseCurve1: 0 + - _EmissionScrollingUseCurve2: 0 + - _EmissionScrollingUseCurve3: 0 + - _EmissionScrollingVertexColor: 0 + - _EmissionScrollingVertexColor1: 0 + - _EmissionScrollingVertexColor2: 0 + - _EmissionScrollingVertexColor3: 0 + - _EmissionStrength: 0 + - _EmissionStrength1: 0 + - _EmissionStrength2: 0 + - _EmissionStrength3: 0 + - _EmissiveBlink_Max: 1 + - _EmissiveBlink_Max1: 1 + - _EmissiveBlink_Max2: 1 + - _EmissiveBlink_Max3: 1 + - _EmissiveBlink_Min: 0 + - _EmissiveBlink_Min1: 0 + - _EmissiveBlink_Min2: 0 + - _EmissiveBlink_Min3: 0 + - _EmissiveBlink_Velocity: 4 + - _EmissiveBlink_Velocity1: 4 + - _EmissiveBlink_Velocity2: 4 + - _EmissiveBlink_Velocity3: 4 + - _EmissiveScroll_Interval: 20 + - _EmissiveScroll_Interval1: 20 + - _EmissiveScroll_Interval2: 20 + - _EmissiveScroll_Interval3: 20 + - _EmissiveScroll_Velocity: 10 + - _EmissiveScroll_Velocity1: 10 + - _EmissiveScroll_Velocity2: 10 + - _EmissiveScroll_Velocity3: 10 + - _EmissiveScroll_Width: 10 + - _EmissiveScroll_Width1: 10 + - _EmissiveScroll_Width2: 10 + - _EmissiveScroll_Width3: 10 + - _EnableALDecal: 0 + - _EnableAudioLink: 0 + - _EnableClearCoat: 0 + - _EnableDissolve: 0 + - _EnableDistortion: 0 + - _EnableEmission: 0 + - _EnableEmission1: 0 + - _EnableEmission2: 0 + - _EnableEmission3: 0 + - _EnableEnvironmentalRim: 0 + - _EnableFlipbook: 0 + - _EnableGITDEmission: 0 + - _EnableGITDEmission1: 0 + - _EnableGITDEmission2: 0 + - _EnableGITDEmission3: 0 + - _EnableIridescence: 0 + - _EnableMirrorOptions: 0 + - _EnablePathing: 0 + - _EnableRimLighting: 0 + - _EnableTouchGlow: 0 + - _EnableUDIMDiscardOptions: 0 + - _FlipbookAdd: 0 + - _FlipbookAlphaControlsFinalAlpha: 0 + - _FlipbookChronotensityBand: 0 + - _FlipbookChronotensityEnabled: 0 + - _FlipbookChronotensitySpeed: 1 + - _FlipbookColorReplaces: 0 + - _FlipbookColorThemeIndex: 0 + - _FlipbookCrossfadeEnabled: 0 + - _FlipbookCurrentFrame: -1 + - _FlipbookEmissionStrength: 0 + - _FlipbookFPS: 30 + - _FlipbookHueShift: 0 + - _FlipbookHueShiftEnabled: 0 + - _FlipbookHueShiftSpeed: 0 + - _FlipbookIntensityControlsAlpha: 0 + - _FlipbookMaskUV: 0 + - _FlipbookMultiply: 0 + - _FlipbookReplace: 1 + - _FlipbookRotation: 0 + - _FlipbookRotationSpeed: 0 + - _FlipbookTexArrayUV: 0 + - _FlipbookTiled: 0 + - _FlipbookTotalFrames: 1 + - _ForgotToLockMaterial: 1 + - _GITDEMaxEmissionMultiplier: 0 + - _GITDEMaxEmissionMultiplier1: 0 + - _GITDEMaxEmissionMultiplier2: 0 + - _GITDEMaxEmissionMultiplier3: 0 + - _GITDEMaxLight: 1 + - _GITDEMaxLight1: 1 + - _GITDEMaxLight2: 1 + - _GITDEMaxLight3: 1 + - _GITDEMinEmissionMultiplier: 1 + - _GITDEMinEmissionMultiplier1: 1 + - _GITDEMinEmissionMultiplier2: 1 + - _GITDEMinEmissionMultiplier3: 1 + - _GITDEMinLight: 0 + - _GITDEMinLight1: 0 + - _GITDEMinLight2: 0 + - _GITDEMinLight3: 0 + - _GITDEWorldOrMesh: 0 + - _GITDEWorldOrMesh1: 0 + - _GITDEWorldOrMesh2: 0 + - _GITDEWorldOrMesh3: 0 + - _GlitterAngleRange: 90 + - _GlitterBias: 0.8 + - _GlitterBlendType: 0 + - _GlitterBrightness: 3 + - _GlitterCenterSize: 0.08 + - _GlitterColorMapUV: 0 + - _GlitterColorThemeIndex: 0 + - _GlitterContrast: 300 + - _GlitterEnable: 0 + - _GlitterFrequency: 300 + - _GlitterHideInShadow: 0 + - _GlitterHueShift: 0 + - _GlitterHueShiftEnabled: 0 + - _GlitterHueShiftSpeed: 0 + - _GlitterJaggyFix: 0 + - _GlitterJitter: 1 + - _GlitterMaskUV: 0 + - _GlitterMinBrightness: 0 + - _GlitterMode: 0 + - _GlitterRandomColors: 0 + - _GlitterRandomRotation: 0 + - _GlitterRandomSize: 0 + - _GlitterShape: 0 + - _GlitterSize: 0.3 + - _GlitterSpeed: 10 + - _GlitterTextureRotation: 0 + - _GlitterUV: 0 + - _GlitterUseSurfaceColor: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GreenColorThemeIndex: 0 + - _GreenTextureUV: 0 + - _HeightMapUV: 0 + - _HeightSteps: 10 + - _HeightStrength: 0.4247461 + - _HeightmaskInvert: 0 + - _HeightmaskUV: 0 + - _HighColorThemeIndex: 0 + - _HighColor_Power: 0.2 + - _HighColor_TexUV: 0 + - _IgnoreFog: 0 + - _Inverse_Clipping: 0 + - _IridescenceAddBlend: 0 + - _IridescenceAudioLinkEmissionBand: 0 + - _IridescenceEmissionStrength: 0 + - _IridescenceHueShift: 0 + - _IridescenceHueShiftEnabled: 0 + - _IridescenceHueShiftSpeed: 0 + - _IridescenceIntensity: 1 + - _IridescenceMaskUV: 0 + - _IridescenceMultiplyBlend: 0 + - _IridescenceNormalIntensity: 1 + - _IridescenceNormalMapUV: 0 + - _IridescenceNormalSelection: 1 + - _IridescenceNormalToggle: 0 + - _IridescenceReplaceBlend: 0 + - _IridescenceTime: 0 + - _Is_BlendAddToHiColor: 0 + - _Is_SpecularToHighColor: 0 + - _Layer1Strength: 1 + - _Layer2Size: 0 + - _Layer2Strength: 0 + - _LightDataAOStrengthA: 0 + - _LightDataAOStrengthB: 0 + - _LightDataAOStrengthG: 0 + - _LightDataAOStrengthR: 1 + - _LightDataDebugEnabled: 0 + - _LightingAOMapsUV: 0 + - _LightingAdditiveEnable: 1 + - _LightingAdditiveGradientEnd: 0.5 + - _LightingAdditiveGradientStart: 0 + - _LightingAdditiveLimit: 1 + - _LightingAdditiveLimitIntensity: 0 + - _LightingAdditiveLimited: 0 + - _LightingAdditiveMaxIntensity: 1 + - _LightingAdditivePassthrough: 0.5 + - _LightingAdditiveType: 1 + - _LightingCap: 1 + - _LightingCapEnabled: 1 + - _LightingCastedShadows: 0 + - _LightingColorMode: 0 + - _LightingDebugVisualize: 0 + - _LightingDetailShadowMapsUV: 0 + - _LightingDetailShadowStrengthA: 0 + - _LightingDetailShadowStrengthB: 0 + - _LightingDetailShadowStrengthG: 0 + - _LightingDetailShadowStrengthR: 1 + - _LightingDirectionMode: 0 + - _LightingForceColorEnabled: 0 + - _LightingForcedColorThemeIndex: 0 + - _LightingGradientEnd: 0.5 + - _LightingGradientEndWrap: 0.5 + - _LightingGradientStart: 0 + - _LightingGradientStartWrap: 0 + - _LightingIgnoreAmbientColor: 0 + - _LightingIndirectUsesNormals: 0 + - _LightingMapMode: 0 + - _LightingMinLightBrightness: 0 + - _LightingMode: 5 + - _LightingMonochromatic: 0 + - _LightingShadowMaskStrengthA: 0 + - _LightingShadowMaskStrengthB: 0 + - _LightingShadowMaskStrengthG: 0 + - _LightingShadowMaskStrengthR: 1 + - _LightingShadowMasksUV: 0 + - _LightingStandardSmoothness: 0 + - _LightingVertexLightingEnabled: 1 + - _LightingWrappedNormalization: 0 + - _LightingWrappedWrap: 0 + - _LockTooltip: 0 + - _MainALHueShiftBand: 0 + - _MainALHueShiftCTIndex: 0 + - _MainBrightness: 0 + - _MainColorAdjustTextureUV: 0 + - _MainColorAdjustToggle: 0 + - _MainHueALCTEnabled: 0 + - _MainHueALMotionSpeed: 1 + - _MainHueShift: 0 + - _MainHueShiftReplace: 1 + - _MainHueShiftSpeed: 0 + - _MainHueShiftToggle: 0 + - _MainTexUV: 0 + - _MainUseVertexColorAlpha: 0 + - _MainVertexColoring: 0 + - _MainVertexColoringLinearSpace: 1 + - _Matcap0CustomNormal: 0 + - _Matcap0NormalMapScale: 1 + - _Matcap0NormalMapUV: 0 + - _Matcap1CustomNormal: 0 + - _Matcap1NormalMapScale: 1 + - _Matcap1NormalMapUV: 0 + - _Matcap2Add: 0 + - _Matcap2AlphaOverride: 0 + - _Matcap2Border: 0.43 + - _Matcap2ColorThemeIndex: 0 + - _Matcap2EmissionStrength: 0 + - _Matcap2Enable: 0 + - _Matcap2HueShift: 0 + - _Matcap2HueShiftEnabled: 0 + - _Matcap2HueShiftSpeed: 0 + - _Matcap2Intensity: 1 + - _Matcap2LightMask: 0 + - _Matcap2MaskInvert: 0 + - _Matcap2MaskUV: 0 + - _Matcap2Multiply: 0 + - _Matcap2Normal: 1 + - _Matcap2Replace: 0 + - _Matcap2UVMode: 1 + - _MatcapAdd: 0 + - _MatcapAlphaOverride: 0 + - _MatcapBorder: 0.43 + - _MatcapColorThemeIndex: 0 + - _MatcapEmissionStrength: 0 + - _MatcapEnable: 0 + - _MatcapHueShift: 0 + - _MatcapHueShiftEnabled: 0 + - _MatcapHueShiftSpeed: 0 + - _MatcapIntensity: 1 + - _MatcapLightMask: 0 + - _MatcapMaskInvert: 0 + - _MatcapMaskUV: 0 + - _MatcapMultiply: 0 + - _MatcapNormal: 1 + - _MatcapReplace: 1 + - _MatcapUVMode: 1 + - _Metallic: 0 + - _Mirror: 0 + - _MirrorTextureUV: 0 + - _MochieBRDF: 1 + - _MochieForceFallback: 0 + - _MochieLitFallback: 0 + - _MochieMetallicMapInvert: 0 + - _MochieMetallicMapUV: 0 + - _MochieMetallicMultiplier: 0 + - _MochieReflectionMaskInvert: 0 + - _MochieReflectionMaskUV: 0 + - _MochieReflectionStrength: 1 + - _MochieReflectionTintThemeIndex: 0 + - _MochieRoughnessMapInvert: 0 + - _MochieRoughnessMapUV: 0 + - _MochieRoughnessMultiplier: 0 + - _MochieSpecularMaskInvert: 0 + - _MochieSpecularMaskUV: 0 + - _MochieSpecularStrength: 1 + - _MochieSpecularTintThemeIndex: 0 + - _Mode: 0 + - _ModelAngleMax: 90 + - _ModelAngleMin: 45 + - _OcclusionStrength: 1 + - _OffsetFactor: 0 + - _OffsetUnits: 0 + - _PPBrightness: 1 + - _PPContrast: 1 + - _PPEmissionMultiplier: 1 + - _PPFinalColorMultiplier: 1 + - _PPHDR: 0 + - _PPHelp: 0 + - _PPHue: 0 + - _PPLUTStrength: 0 + - _PPLightingAddition: 0 + - _PPLightingMultiplier: 1 + - _PPLightness: 0 + - _PPMaskInvert: 0 + - _PPMaskUV: 0 + - _PPSaturation: 1 + - _PanoUseBothEyes: 1 + - _Parallax: 0.02 + - _ParallaxUV: 0 + - _PathColorBThemeIndex: 0 + - _PathColorGThemeIndex: 0 + - _PathColorRThemeIndex: 0 + - _PathTypeB: 0 + - _PathTypeG: 0 + - _PathTypeR: 0 + - _PathingColorMapUV: 0 + - _PathingMapUV: 0 + - _PoiParallax: 0 + - _PolarLengthScale: 1 + - _PolarRadialScale: 1 + - _PolarSpiralPower: 0 + - _PolarUV: 0 + - _PostProcess: 0 + - _RGBBlendMultiplicative: 0 + - _RGBMaskEnabled: 0 + - _RGBMaskUV: 0 + - _RGBNormalBlend: 0 + - _RGBUseVertexColors: 0 + - _RedColorThemeIndex: 0 + - _RedTexureUV: 0 + - _RenderingReduceClipDistance: 0 + - _RgbNormalAScale: 0 + - _RgbNormalAUV: 0 + - _RgbNormalBScale: 0 + - _RgbNormalBUV: 0 + - _RgbNormalGScale: 0 + - _RgbNormalGUV: 0 + - _RgbNormalRScale: 0 + - _RgbNormalRUV: 0 + - _RgbNormalsEnabled: 0 + - _RimBrighten: 0 + - _RimEnviroBlur: 0.7 + - _RimEnviroIntensity: 1 + - _RimEnviroMaskUV: 0 + - _RimEnviroMinBrightness: 0 + - _RimEnviroSharpness: 0 + - _RimEnviroWidth: 0.45 + - _RimHueShift: 0 + - _RimHueShiftEnabled: 0 + - _RimHueShiftSpeed: 0 + - _RimLightColorBias: 1 + - _RimLightColorThemeIndex: 0 + - _RimLightNormal: 1 + - _RimLightingInvert: 0 + - _RimMaskUV: 0 + - _RimSharpness: 0.25 + - _RimStrength: 0 + - _RimTexUV: 0 + - _RimWidth: 0.8 + - _Saturation: 0 + - _ScrollingEmission: 0 + - _ScrollingEmission1: 0 + - _ScrollingEmission2: 0 + - _ScrollingEmission3: 0 + - _Set_HighColorMaskUV: 0 + - _ShadeColor_Step: 0 + - _ShaderOptimizerEnabled: 0 + - _ShadingEnabled: 1 + - _ShadingShadeMapBlendType: 0 + - _ShadowOffset: 0 + - _ShadowStrength: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SssBumpBlur: 0.7 + - _SssScale: 1 + - _StencilCompareFunction: 8 + - _StencilFailOp: 0 + - _StencilPassOp: 0 + - _StencilReadMask: 255 + - _StencilRef: 0 + - _StencilWriteMask: 255 + - _StencilZFailOp: 0 + - _StereoEnabled: 0 + - _StylizedSpecular: 0 + - _StylizedSpecular2Feather: 0 + - _StylizedSpecularFeather: 0 + - _StylizedSpecularStrength: 1 + - _TextEnabled: 0 + - _TextFPSColorThemeIndex: 0 + - _TextFPSEmissionStrength: 0 + - _TextFPSEnabled: 0 + - _TextFPSRotation: 0 + - _TextFPSUV: 0 + - _TextPixelRange: 4 + - _TextPositionColorThemeIndex: 0 + - _TextPositionEmissionStrength: 0 + - _TextPositionEnabled: 0 + - _TextPositionRotation: 0 + - _TextPositionUV: 0 + - _TextTimeColorThemeIndex: 0 + - _TextTimeEmissionStrength: 0 + - _TextTimeEnabled: 0 + - _TextTimeRotation: 0 + - _TextTimeUV: 0 + - _Tweak_HighColorMaskLevel: 0 + - _UDIMDiscardMode: 1 + - _UDIMDiscardUV: 0 + - _UVSec: 0 + - _Unlit_Intensity: 1 + - _UseLightColor: 1 + - _Use_1stAs2nd: 0 + - _Use_1stShadeMapAlpha_As_ShadowMask: 0 + - _Use_2ndShadeMapAlpha_As_ShadowMask: 0 + - _Use_BaseAs1st: 0 + - _VertexAudioLinkEnabled: 0 + - _VertexLocalRotationALBandX: 0 + - _VertexLocalRotationALBandY: 0 + - _VertexLocalRotationALBandZ: 0 + - _VertexLocalRotationCTALBandX: 0 + - _VertexLocalRotationCTALBandY: 0 + - _VertexLocalRotationCTALBandZ: 0 + - _VertexLocalRotationCTALTypeX: 0 + - _VertexLocalRotationCTALTypeY: 0 + - _VertexLocalRotationCTALTypeZ: 0 + - _VertexLocalScaleALBand: 0 + - _VertexLocalTranslationALBand: 0 + - _VertexManipulationHeight: 0 + - _VertexManipulationHeightBand: 0 + - _VertexManipulationHeightBias: 0 + - _VertexManipulationHeightMaskUV: 0 + - _VertexManipulationsEnabled: 0 + - _VertexRoundingDivision: 500 + - _VertexRoundingEnabled: 0 + - _VertexRoundingRangeBand: 0 + - _VertexWorldTranslationALBand: 0 + - _ZTest: 4 + - _ZWrite: 1 + - _glitterFrequencyLinearEmissive: 20 + - enum_fallback: 0 + - footer_discord: 0 + - footer_github: 0 + - footer_patreon: 0 + - footer_twitter: 0 + - footer_youtube: 0 + - m_AudioLinkCategory: 0 + - m_end_ALDecalSpectrum: 0 + - m_end_Alpha: 0 + - m_end_BonusSliders: 0 + - m_end_CubeMap: 0 + - m_end_Decal0: 0 + - m_end_Decal0AudioLink: 0 + - m_end_Decal1: 0 + - m_end_Decal1AudioLink: 0 + - m_end_Decal2: 0 + - m_end_Decal2AudioLink: 0 + - m_end_Decal3: 0 + - m_end_Decal3AudioLink: 0 + - m_end_DecalSection: 0 + - m_end_DetailOptions: 0 + - m_end_FlipbookAudioLink: 0 + - m_end_GlobalThemes: 0 + - m_end_Iridescence: 0 + - m_end_IridescenceAudioLink: 0 + - m_end_MainHueShift: 0 + - m_end_MainVertexColors: 0 + - m_end_Matcap2: 0 + - m_end_PathAudioLink: 0 + - m_end_PoiLightData: 0 + - m_end_PoiShading: 0 + - m_end_RGBMask: 0 + - m_end_StencilPassOptions: 0 + - m_end_Text: 0 + - m_end_TextFPS: 0 + - m_end_TextInstanceTime: 0 + - m_end_TextPosition: 0 + - m_end_audioLink: 0 + - m_end_backFace: 0 + - m_end_blending: 0 + - m_end_brdf: 0 + - m_end_clearCoat: 0 + - m_end_crossfade: 0 + - m_end_depthFX: 0 + - m_end_dissolve: 0 + - m_end_dissolveHueShift: 0 + - m_end_emission1Options: 0 + - m_end_emission2Options: 0 + - m_end_emission3Options: 0 + - m_end_emissionOptions: 0 + - m_end_emissions: 0 + - m_end_flipBook: 0 + - m_end_flipbookHueShift: 0 + - m_end_glitter: 0 + - m_end_manualFlipbookControl: 0 + - m_end_matcap: 0 + - m_end_mirrorOptions: 0 + - m_end_parallax: 0 + - m_end_pathing: 0 + - m_end_pointToPoint: 0 + - m_end_postprocess: 0 + - m_end_reflectionRim: 0 + - m_end_rimLightOptions: 0 + - m_end_stylizedSpec: 0 + - m_end_udimdiscardOptions: 0 + - m_end_uvDistortion: 0 + - m_end_uvPanosphere: 0 + - m_end_uvPolar: 0 + - m_end_vertexManipulation: 0 + - m_lightingCategory: 1 + - m_mainCategory: 0 + - m_modifierCategory: 0 + - m_postprocessing: 0 + - m_renderingCategory: 0 + - m_specialFXCategory: 0 + - m_start_ALDecalSpectrum: 0 + - m_start_Alpha: 0 + - m_start_BonusSliders: 0 + - m_start_CubeMap: 0 + - m_start_Decal0: 0 + - m_start_Decal0AudioLink: 0 + - m_start_Decal1: 0 + - m_start_Decal1AudioLink: 0 + - m_start_Decal2: 0 + - m_start_Decal2AudioLink: 0 + - m_start_Decal3: 0 + - m_start_Decal3AudioLink: 0 + - m_start_DecalSection: 0 + - m_start_DetailOptions: 0 + - m_start_FlipbookAudioLink: 0 + - m_start_GlobalThemes: 0 + - m_start_Iridescence: 0 + - m_start_IridescenceAudioLink: 0 + - m_start_MainHueShift: 0 + - m_start_MainVertexColors: 0 + - m_start_Matcap2: 0 + - m_start_PathAudioLink: 0 + - m_start_PoiLightData: 0 + - m_start_PoiShading: 0 + - m_start_RGBMask: 0 + - m_start_StencilPassOptions: 0 + - m_start_Text: 0 + - m_start_TextFPS: 0 + - m_start_TextInstanceTime: 0 + - m_start_TextPosition: 0 + - m_start_audioLink: 0 + - m_start_backFace: 0 + - m_start_blending: 0 + - m_start_brdf: 1 + - m_start_clearCoat: 0 + - m_start_crossfade: 0 + - m_start_depthFX: 0 + - m_start_dissolve: 0 + - m_start_dissolveHueShift: 0 + - m_start_emission1Options: 0 + - m_start_emission2Options: 0 + - m_start_emission3Options: 0 + - m_start_emissionOptions: 0 + - m_start_emissions: 0 + - m_start_flipBook: 0 + - m_start_flipbookHueShift: 0 + - m_start_glitter: 0 + - m_start_manualFlipbookControl: 0 + - m_start_matcap: 0 + - m_start_mirrorOptions: 0 + - m_start_parallax: 0 + - m_start_pathing: 0 + - m_start_pointToPoint: 0 + - m_start_postprocess: 0 + - m_start_reflectionRim: 0 + - m_start_rimLightOptions: 0 + - m_start_stylizedSpec: 0 + - m_start_udimdiscardOptions: 0 + - m_start_uvDistortion: 0 + - m_start_uvPanosphere: 0 + - m_start_uvPolar: 0 + - m_start_vertexManipulation: 0 + - m_thirdpartyCategory: 0 + - shader_is_using_thry_editor: 69 + - shader_master_label: 0 + m_Colors: + - _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _1st_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1} + - _2nd_ShadeMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ALDecalVolumeColorHigh: {r: 1, g: 0, b: 0, a: 1} + - _ALDecalVolumeColorLow: {r: 0, g: 0, b: 1, a: 1} + - _ALDecalVolumeColorMid: {r: 0, g: 1, b: 0, a: 1} + - _ALDecaldCircleDimensions: {r: 0, g: 1, b: 0, a: 1} + - _ALUVPosition: {r: 0.5, g: 0.5, b: 1, a: 1} + - _ALUVScale: {r: 1, g: 1, b: 1, a: 1} + - _AlphaAudioLinkAddRange: {r: 0, g: 0, b: 0, a: 0} + - _AlphaColor: {r: 1, g: 1, b: 1, a: 1} + - _AlphaTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _AngleForwardDirection: {r: 0, g: 0, b: 1, a: 1} + - _AudioLinkDecal0Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal0Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal1Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal2Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Alpha: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Emission: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Rotation: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3Scale: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMax: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkDecal3SideMin: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission0CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission1CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission2CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkEmission3CenterOut: {r: 0, g: 0, b: 0, a: 0} + - _AudioLinkPathTimeOffsetB: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetG: {r: 0, g: 0, b: 0, a: 1} + - _AudioLinkPathTimeOffsetR: {r: 0, g: 0, b: 0, a: 1} + - _BackFaceColor: {r: 1, g: 1, b: 1, a: 1} + - _BackFaceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _BackFaceTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BlueColor: {r: 1, g: 1, b: 1, a: 1} + - _BlueTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _BumpMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatSmoothnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _ClearCoatTint: {r: 1, g: 1, b: 1, a: 1} + - _ClippingMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapColor: {r: 1, g: 1, b: 1, a: 1} + - _CubeMapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor2: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor3: {r: 1, g: 1, b: 1, a: 1} + - _DecalMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DecalPosition: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition1: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition2: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalPosition3: {r: 0.5, g: 0.5, b: 0, a: 0} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale1: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale2: {r: 1, g: 1, b: 0, a: 0} + - _DecalScale3: {r: 1, g: 1, b: 0, a: 0} + - _DecalSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset1: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset2: {r: 0, g: 0, b: 0, a: 0} + - _DecalSideOffset3: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture2Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexture3Pan: {r: 0, g: 0, b: 0, a: 0} + - _DecalTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DepthColor: {r: 1, g: 1, b: 1, a: 1} + - _DepthMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DepthTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DetailMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTexPan: {r: 0, g: 0, b: 0, a: 0} + - _DetailTint: {r: 1, g: 1, b: 1, a: 1} + - _DissolveDetailNoisePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveEdgeColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveEndPoint: {r: 0, g: 1, b: 0, a: 0} + - _DissolveMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveNoiseTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DissolveStartPoint: {r: 0, g: -1, b: 0, a: 0} + - _DissolveTextureColor: {r: 1, g: 1, b: 1, a: 1} + - _DissolveToTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexture1Pan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionFlowTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _DistortionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL0StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL1StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL2StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionAL3StrengthMod: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor1: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor2: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor3: {r: 1, g: 1, b: 1, a: 1} + - _EmissionMap1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMap3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMapPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask1Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask2Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMask3Pan: {r: 0, g: 0, b: 0, a: 0} + - _EmissionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveScroll_Direction: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction1: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction2: {r: 0, g: -10, b: 0, a: 0} + - _EmissiveScroll_Direction3: {r: 0, g: -10, b: 0, a: 0} + - _FlipbookColor: {r: 1, g: 1, b: 1, a: 1} + - _FlipbookCrossfadeRange: {r: 0.75, g: 1, b: 0, a: 1} + - _FlipbookMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookScaleOffset: {r: 1, g: 1, b: 0, a: 0} + - _FlipbookSideOffset: {r: 0, g: 0, b: 0, a: 0} + - _FlipbookTexArrayPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterColor: {r: 1, g: 1, b: 1, a: 1} + - _GlitterColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterMinMaxBrightness: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSaturation: {r: 0.8, g: 1, b: 0, a: 1} + - _GlitterMinMaxSize: {r: 0.1, g: 0.5, b: 0, a: 1} + - _GlitterPan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _GlitterUVPanning: {r: 0, g: 0, b: 0, a: 0} + - _GlobalThemeColor0: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor1: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor2: {r: 1, g: 1, b: 1, a: 1} + - _GlobalThemeColor3: {r: 1, g: 1, b: 1, a: 1} + - _GreenColor: {r: 1, g: 1, b: 1, a: 1} + - _GreenTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _HeightMapPan: {r: 0, g: 0, b: 0, a: 0} + - _HeightmaskPan: {r: 0, g: 0, b: 0, a: 0} + - _HighColor: {r: 1, g: 1, b: 1, a: 1} + - _HighColor_TexPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceAudioLinkEmission: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceNormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _IridescenceRampPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingAOMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingDetailShadowMapsPan: {r: 0, g: 0, b: 0, a: 0} + - _LightingForcedColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowColor: {r: 1, g: 1, b: 1, a: 1} + - _LightingShadowMasksPan: {r: 0, g: 0, b: 0, a: 0} + - _LightngForcedDirection: {r: 0, g: 0, b: 0, a: 1} + - _MainColorAdjustTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MainTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap0NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap1NormalMapPan: {r: 0, g: 0, b: 0, a: 0} + - _Matcap2Color: {r: 1, g: 1, b: 1, a: 1} + - _Matcap2MaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MatcapColor: {r: 1, g: 1, b: 1, a: 1} + - _MatcapMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MirrorTexturePan: {r: 0, g: 0, b: 0, a: 0} + - _MochieMetallicMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _MochieRoughnessMapPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _MochieSpecularTint: {r: 1, g: 1, b: 1, a: 1} + - _PPMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _PPRGB: {r: 1, g: 1, b: 1, a: 1} + - _PPTint: {r: 1, g: 1, b: 1, a: 1} + - _PathColorB: {r: 1, g: 1, b: 1, a: 1} + - _PathColorG: {r: 1, g: 1, b: 1, a: 1} + - _PathColorR: {r: 1, g: 1, b: 1, a: 1} + - _PathEmissionStrength: {r: 0, g: 0, b: 0, a: 1} + - _PathOffset: {r: 0, g: 0, b: 0, a: 1} + - _PathSegments: {r: 0, g: 0, b: 0, a: 1} + - _PathSoftness: {r: 1, g: 1, b: 1, a: 1} + - _PathSpeed: {r: 1, g: 1, b: 1, a: 1} + - _PathTime: {r: -999, g: -999, b: -999, a: 1} + - _PathWidth: {r: 0.03, g: 0.03, b: 0.03, a: 1} + - _PathingColorMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PathingMapPan: {r: 0, g: 0, b: 0, a: 0} + - _PolarCenter: {r: 0.5, g: 0.5, b: 0, a: 0} + - _RGBMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RedColor: {r: 1, g: 1, b: 1, a: 1} + - _RedTexurePan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalAPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalBPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalGPan: {r: 0, g: 0, b: 0, a: 0} + - _RgbNormalRPan: {r: 0, g: 0, b: 0, a: 0} + - _RimEnviroMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimLightColor: {r: 1, g: 1, b: 1, a: 1} + - _RimMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _RimTexPan: {r: 0, g: 0, b: 0, a: 0} + - _Set_HighColorMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _SssColorBleedAoWeights: {r: 0.4, g: 0.15, b: 0.13, a: 0} + - _SssTransmissionAbsorption: {r: -8, g: -40, b: -64, a: 0} + - _TextFPSColor: {r: 1, g: 1, b: 1, a: 1} + - _TextFPSOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextFPSScale: {r: 1, g: 1, b: 1, a: 1} + - _TextPositionColor: {r: 1, g: 0, b: 1, a: 1} + - _TextPositionOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionPadding: {r: 0, g: 0, b: 0, a: 0} + - _TextPositionScale: {r: 1, g: 1, b: 1, a: 1} + - _TextTimeColor: {r: 1, g: 0, b: 1, a: 1} + - _TextTimeOffset: {r: 0, g: 0, b: 0, a: 0} + - _TextTimePadding: {r: 0, g: 0, b: 0, a: 0} + - _TextTimeScale: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow0: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow1: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow2: {r: 1, g: 1, b: 1, a: 1} + - _UDIMDiscardRow3: {r: 1, g: 1, b: 1, a: 1} + - _VertexLocalRotationAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalRotationCTALSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalScaleALMax: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalScaleALMin: {r: 0, g: 0, b: 0, a: 0} + - _VertexLocalTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexLocalTranslationALMin: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationHeightMaskPan: {r: 0, g: 0, b: 0, a: 0} + - _VertexManipulationLocalRotation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalRotationSpeed: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationLocalScale: {r: 1, g: 1, b: 1, a: 1} + - _VertexManipulationLocalTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexManipulationWorldTranslation: {r: 0, g: 0, b: 0, a: 1} + - _VertexRoundingRangeAL: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMax: {r: 0, g: 0, b: 0, a: 1} + - _VertexWorldTranslationALMin: {r: 0, g: 0, b: 0, a: 1} diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat.meta new file mode 100644 index 00000000..d2519f2d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Presets/Reflections & Specular/MP_ShinyNonMetal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a384a09735f51c9438a65fcf9f73e353 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts.meta new file mode 100644 index 00000000..efc55817 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfc4de536d16ce04fb4f58bf9a796b91 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor.meta new file mode 100644 index 00000000..b5dc099d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ba8a9a820115514eb9060525c6d7446 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem.meta new file mode 100644 index 00000000..1ad97692 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b6214b5cc59f18046a3a257c6d8731cc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors.meta new file mode 100644 index 00000000..6d4a06a0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ba88caeb15a1b0469773b278aa26bab +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components.meta new file mode 100644 index 00000000..1352cc98 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13fa33428f9f4a84b8e3dc4bfedd6e64 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs new file mode 100644 index 00000000..101adaa6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs @@ -0,0 +1,651 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; +using Poiyomi.ModularShaderSystem.UI; + +namespace Poiyomi.ModularShaderSystem.Debug +{ + public class FunctionTimeline : IModularShaderDebuggerTab + { + public VisualElement TabContainer { get; set; } + public string TabName { get; set; } + + public FunctionTimeline() + { + TabName = "Function Timeline"; + TabContainer = new VisualElement(); + + var styleSheet = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/FunctionTimelineStyle"); + TabContainer.styleSheets.Add(styleSheet); + TabContainer.style.flexGrow = 1; + } + + public void UpdateTab(ModularShader shader) + { + TabContainer.Clear(); + if (shader == null) return; + TabContainer.Add(new TimelineContainer(shader)); + } + } + + internal class FunctionItem : VisualElement + { + public ShaderFunction Function { get; } + public TimelineRow Row { get; set; } + public int Size { get; } + public int Offset { get; } + + private TimelineRoot _root; + + public FunctionItem(TimelineRoot root, ShaderFunction function, int size, int offset) + { + _root = root; + Function = function; + Size = size; + Offset = offset; + + style.left = Offset; + style.width = Size; + + var label = new Label(Function.Name); + label.AddToClassList("function-header-name"); + var queue = new Label("" + Function.Queue); + queue.AddToClassList("function-header-queue"); + Add(label); + Add(queue); + + RegisterCallback(evt => + { + if (evt.button != 0) return; + _root.SelectedFunction = this; + }); + } + } + + internal class TimelineRow : VisualElement + { + public ShaderModule Module { get; } + + public List Functions { get; set; } + + private VisualElement _title; + public VisualElement _content; + public List _contentChilden; + + public TimelineRow(ShaderModule module) + { + Module = module; + + Functions = new List(); + _contentChilden = new List(); + + _title = new VisualElement(); + _content = new VisualElement(); + _title.AddToClassList("timeline-title"); + _content.AddToClassList("timeline-content"); + + _title.Add(new Label(Module.Name)); + + Add(_content); + Add(_title); + } + + public void SetContentSize(int size) + { + _content.style.width = size; + } + + public void ApplyFunctionsToTimeline() + { + _content.Clear(); + _contentChilden.Clear(); + + for (int index = Functions.Count - 1; index >= 0; index--) + { + FunctionItem function = Functions[index]; + int counter = 0; + bool found = false; + var functionStart = function.Offset; + var functionEnd = function.Offset + function.Size; + while (counter < _contentChilden.Count) + { + if (!TimelineBusyAt(_contentChilden[counter], functionStart, functionEnd)) + { + _contentChilden[counter].Add(function); + function.Row = this; + found = true; + break; + } + counter++; + } + if (found) continue; + var newRow = new VisualElement(); + newRow.AddToClassList("timeline-content-row"); + _contentChilden.Add(newRow); + _content.Add(newRow); + newRow.Add(function); + function.Row = this; + } + } + + private static bool TimelineBusyAt(VisualElement content, int functionStart, int functionEnd) + { + return content.Children().Cast().Any(x => functionStart < x.Offset + x.Size && functionStart > x.Offset && functionEnd <= x.Offset + x.Size); + } + + public void SetRowsHeight() + { + foreach (VisualElement element in _contentChilden) + element.style.height = element[0].resolvedStyle.height + 8; + } + } + + internal class TimelineRoot : VisualElement + { + public List Rows { get; set; } + public List Functions { get; set; } + + public FunctionItem SelectedFunction + { + get => _selectedFunction; + set + { + _selectedFunction = value; + ResetSelectedClass(); + OnSelectedFunctionChanged?.Invoke(_selectedFunction); + } + } + + public string Keyword { get; } + + public Action OnSelectedFunctionChanged { get; set; } + public Action OnTimelineFirstDispatch { get; set; } + + private readonly Dictionary _moduleByFunction; + private FunctionItem _selectedFunction; + + public TimelineRoot(Dictionary moduleByFunction, List allFunctions, string rootKeyword) + { + Keyword = rootKeyword; + Rows = new List(); + Functions = new List(); + int offset = 0; + _moduleByFunction = moduleByFunction; + foreach (var fn in allFunctions.Where(x => x.AppendAfter.Equals(rootKeyword)).OrderBy(x => x.Queue)) + { + offset += CreateFunctionHierarchy(allFunctions, fn, offset); + } + + foreach (TimelineRow row in Rows) + { + Add(row); + row.SetContentSize(offset + 30); + row.ApplyFunctionsToTimeline(); + } + + RegisterCallback(GeometryChangedCallback); + } + + private void GeometryChangedCallback(GeometryChangedEvent evt) + { + UnregisterCallback(GeometryChangedCallback); + + foreach (TimelineRow row in Rows) + { + row.SetRowsHeight(); + } + + OnTimelineFirstDispatch?.Invoke(); + } + + private int CreateFunctionHierarchy(List functions, ShaderFunction function, int offset) + { + int size = 0; + var module = _moduleByFunction[function]; + var row = Rows.FirstOrDefault(x => x.Module == module); + if (row == null) + { + row = new TimelineRow(module); + Rows.Add(row); + } + + foreach (var fn in functions.Where(x => x.AppendAfter.Equals(function.Name)).OrderBy(x => x.Queue)) + size += CreateFunctionHierarchy(functions, fn, offset + size + 30); + + if (size == 0) size = 224; + else size += 30; + + var functionItem = new FunctionItem(this, function, size - 4, offset); + row.Functions.Add(functionItem); + Functions.Add(functionItem); + + return size; + } + + public float GetScrollAdjustment() + { + float factor = 1.1f; + if (Rows.Count <= 0) return factor; + + var width = Rows[0]._content.style.width.value.value; + var screenWidth = Rows[0]._content.resolvedStyle.width; + factor = screenWidth / width; + + return factor; + } + + public void Scroll(float f) + { + foreach (TimelineRow row in Rows) + { + var width = row._content.style.width.value.value; + var screenWidth = row._content.resolvedStyle.width; + if(width > screenWidth) + row._content.style.left = -((width- screenWidth) * f); + } + } + + public void ResetSelectedClass() + { + foreach (FunctionItem function in Functions) + { + if (function == SelectedFunction && !function.ClassListContains("selected-function")) + function.AddToClassList("selected-function"); + else if (function != SelectedFunction && function.ClassListContains("selected-function")) + function.RemoveFromClassList("selected-function"); + } + } + } + + internal class VariablesViewer : VisualElement + { + public Action OnVariableSelected { get; set; } + + private List _variables; + + public VariablesViewer(ModularShader shader) + { + var variables = shader.BaseModules.Concat(shader.AdditionalModules).SelectMany(x => x.Functions).SelectMany(x => x.UsedVariables).Distinct().OrderBy(x => x.Type).ThenBy(x => x.Name); + + var title = new Label("Variables List"); + title.AddToClassList("area-title"); + var content = new ScrollView(ScrollViewMode.Vertical); + content.AddToClassList("area-content"); + + _variables = new List(); + + foreach (Variable variable in variables) + { + var element = new VariableField(variable); + _variables.Add(element); + content.Add(element); + + element.RegisterCallback(evt => + { + if (evt.button != 0) return; + foreach (VariableField field in _variables) + { + if (field.ClassListContains("selected-variable-global")) + field.RemoveFromClassList("selected-variable-global"); + } + + element.AddToClassList("selected-variable-global"); + OnVariableSelected?.Invoke(element.Variable); + }); + } + + Add(title); + Add(content); + } + } + + internal class FunctionViewer : VisualElement + { + public ShaderFunction SelectedItem + { + get => _selectedItem; + set + { + _selectedItem = value; + _appendAfter.Value = _selectedItem?.AppendAfter; + _name.Value = _selectedItem?.Name; + _queue.Value = "" + _selectedItem?.Queue; + + _variables.Clear(); + _variablesFoldout.Clear(); + _variableKeywordsFoldout.Clear(); + _codeKeywordsFoldout.Clear(); + if (_selectedItem == null) + { + OnVariableSelected?.Invoke(null); + return; + } + + foreach (Variable variable in _selectedItem.UsedVariables) + { + var element = new VariableField(variable); + _variables.Add(element); + _variablesFoldout.Add(element); + + element.RegisterCallback(evt => + { + if (evt.button != 0) return; + foreach (VariableField field in _variables) + { + if (field.ClassListContains("selected-variable")) + field.RemoveFromClassList("selected-variable"); + } + element.AddToClassList("selected-variable"); + OnVariableSelected?.Invoke(element.Variable); + }); + } + + + foreach (string keyword in _selectedItem.VariableKeywords) + _variableKeywordsFoldout.Add(new Label(keyword)); + if(_variableKeywordsFoldout.childCount == 0) + _variableKeywordsFoldout.Add(new Label("None")); + + foreach (string keyword in _selectedItem.CodeKeywords) + _codeKeywordsFoldout.Add(new Label(keyword)); + if(_codeKeywordsFoldout.childCount == 0) + _codeKeywordsFoldout.Add(new Label("None")); + } + } + + public Action OnVariableSelected { get; set; } + + private LabelField _appendAfter; + private LabelField _name; + private LabelField _queue; + private ShaderFunction _selectedItem; + private Foldout _variablesFoldout; + private List _variables; + private readonly Foldout _variableKeywordsFoldout; + private readonly Foldout _codeKeywordsFoldout; + + public FunctionViewer() + { + var title = new Label("Selected function information"); + title.AddToClassList("area-title"); + var content = new ScrollView(ScrollViewMode.Vertical); + content.AddToClassList("area-content"); + + _name = new LabelField("Name", ""); + _appendAfter = new LabelField("Append After", ""); + _queue = new LabelField("Queue", ""); + + _variablesFoldout = new Foldout(); + _variablesFoldout.text = "Variables"; + _variables = new List(); + + _variableKeywordsFoldout = new Foldout(); + _variableKeywordsFoldout.text = "Variable Keywords"; + + _codeKeywordsFoldout = new Foldout(); + _codeKeywordsFoldout.text = "Code Keywords"; + + Add(title); + Add(content); + content.Add(_name); + content.Add(_appendAfter); + content.Add(_queue); + content.Add(_variablesFoldout); + content.Add(_variableKeywordsFoldout); + content.Add(_codeKeywordsFoldout); + } + } + + internal class ModuleViewer : VisualElement + { + public ShaderModule SelectedItem + { + get => _selectedItem; + set + { + _selectedItem = value; + if (_selectedItem == null) + { + _name.Value = null; + _id.Value = null; + _description.Value =null; + _author.Value = null; + _version.Value = null; + if(_content.Contains(_selectButton)) _content.Remove(_selectButton); + return; + } + _name.Value = _selectedItem.Name; + _id.Value = _selectedItem.Id; + _description.Value = _selectedItem.Description; + _author.Value = _selectedItem.Author; + _version.Value = _selectedItem.Version; + + if(!_content.Contains(_selectButton)) _content.Add(_selectButton); + } + } + + private ShaderModule _selectedItem; + private readonly LabelField _name; + private readonly LabelField _id; + private readonly LabelField _author; + private readonly LabelField _description; + private readonly LabelField _version; + private Button _selectButton; + private ScrollView _content; + + public ModuleViewer() + { + var title = new Label("Function's module base info"); + title.AddToClassList("area-title"); + var content = new ScrollView(ScrollViewMode.Vertical); + _content = content; + _content.AddToClassList("area-content"); + + _name = new LabelField("Name", ""); + _id = new LabelField("Id", ""); + _author = new LabelField("Author", ""); + _description = new LabelField("Description", ""); + _version = new LabelField("Version", ""); + + _selectButton = new Button(() => + { + if (_selectedItem == null) return; + Selection.SetActiveObjectWithContext(_selectedItem,_selectedItem); + }); + + _selectButton.text = "Select module in inspector"; + + Add(title); + Add(_content); + + _content.Add(_name); + _content.Add(_id); + _content.Add(_author); + _content.Add(_description); + _content.Add(_version); + } + } + + internal class FunctionTemplateViewer : VisualElement + { + public string SelectedItem + { + get => _selectedItem; + set + { + _selectedItem = value; + _viewer.Text = _selectedItem; + } + } + + private CodeViewElement _viewer; + private string _selectedItem; + + public FunctionTemplateViewer() + { + _viewer = new CodeViewElement(); + + var title = new Label("Function code template"); + title.AddToClassList("area-title"); + + Add(title); + Add(_viewer); + } + } + + internal class TimelineContainer : VisualElement + { + private List _roots; + private PopupField _popup; + + public TimelineContainer(ModularShader shader) + { + var left = new VisualElement(); + var right = new VisualElement(); + var bot = new VisualElement(); + var templateViewer = new FunctionTemplateViewer(); + var variablesViewer = new VariablesViewer(shader); + var functionViewer = new FunctionViewer(); + var moduleViewer = new ModuleViewer(); + + left.style.flexShrink = 0; + left.style.width = new StyleLength(Length.Percent(70)); + right.style.width = new StyleLength(Length.Percent(30)); + bot.style.height = new StyleLength(Length.Percent(50)); + bot.style.flexDirection = FlexDirection.Row; + style.flexDirection = FlexDirection.Row; + Add(left); + Add(right); + + var scroller = new Scroller(0,1,f => + { + _popup.value.Scroll(f); + }, SliderDirection.Horizontal); + + _roots = new List(); + var functions = new List(); + Dictionary moduleByFunction = new Dictionary(); + + foreach (var module in shader.BaseModules) + { + functions.AddRange(module.Functions); + foreach (var function in module.Functions) + if (!moduleByFunction.ContainsKey(function)) + moduleByFunction.Add(function, module); + } + + foreach (var module in shader.AdditionalModules) + { + functions.AddRange(module.Functions); + foreach (var function in module.Functions) + if (!moduleByFunction.ContainsKey(function)) + moduleByFunction.Add(function, module); + } + + foreach (var keyword in functions.Select(x => x.AppendAfter).Distinct().Where(x => x.StartsWith("#K#"))) + { + var root = new TimelineRoot(moduleByFunction, functions, keyword); + root.OnSelectedFunctionChanged = item => + { + functionViewer.SelectedItem = item.Function; + moduleViewer.SelectedItem = item.Row.Module; + templateViewer.SelectedItem = item.Function.ShaderFunctionCode == null ? null : item.Function.ShaderFunctionCode.Template; + + variablesViewer.OnVariableSelected = variable => + { + foreach (FunctionItem f in root.Functions) + { + bool toHighlight = f.Function.UsedVariables.Any(x => x == variable); + + if(toHighlight && !f.ClassListContains("contains-variable-global")) + f.AddToClassList("contains-variable-global"); + if(!toHighlight && f.ClassListContains("contains-variable-global")) + f.RemoveFromClassList("contains-variable-global"); + } + }; + + functionViewer.OnVariableSelected = variable => + { + foreach (FunctionItem f in root.Functions) + { + bool toHighlight = f.Function.UsedVariables.Any(x => x == variable); + + if(toHighlight && !f.ClassListContains("contains-variable")) + f.AddToClassList("contains-variable"); + if(!toHighlight && f.ClassListContains("contains-variable")) + f.RemoveFromClassList("contains-variable"); + } + }; + + foreach (FunctionItem f in root.Functions) + { + if(f.ClassListContains("contains-variable")) + f.RemoveFromClassList("contains-variable"); + } + }; + root.OnTimelineFirstDispatch = () => + { + scroller.Adjust(root.GetScrollAdjustment()); + }; + _roots.Add(root); + } + + var timelineContent = new VisualElement(); + if (_roots.Count == 0) + { + Label label = new Label("No roots found"); + left.Add(label); + return; + } + timelineContent.Add(_roots[0]); + + variablesViewer.OnVariableSelected = variable => + { + foreach (FunctionItem f in _roots[0].Functions) + { + bool toHighlight = f.Function.UsedVariables.Any(x => x == variable); + + if(toHighlight && !f.ClassListContains("contains-variable-global")) + f.AddToClassList("contains-variable-global"); + if(!toHighlight && f.ClassListContains("contains-variable-global")) + f.RemoveFromClassList("contains-variable-global"); + } + }; + + var timelineScroll = new ScrollView(ScrollViewMode.Vertical); + timelineScroll.AddToClassList("timeline"); + timelineScroll.style.flexGrow = 1; + timelineScroll.Add(timelineContent); + + _popup = new PopupField("Root keywords", _roots, 0, root => { return root.Keyword; }, root => { return root.Keyword; }); + _popup.RegisterValueChangedCallback(evt => + { + timelineContent.Clear(); + timelineContent.Add(evt.newValue); + functionViewer.SelectedItem = evt.newValue?.SelectedFunction?.Function; + moduleViewer.SelectedItem = evt.newValue?.SelectedFunction?.Row.Module; + templateViewer.SelectedItem = evt.newValue?.SelectedFunction?.Function.ShaderFunctionCode.Template; + scroller.Adjust(evt.newValue.GetScrollAdjustment()); + scroller.value = 0; + evt.newValue.Scroll(0); + }); + + scroller.Adjust(_popup.value.GetScrollAdjustment()); + + timelineScroll.Add(timelineContent); + + left.Add(_popup); + left.Add(timelineScroll); + left.Add(scroller); + left.Add(bot); + right.Add(templateViewer); + bot.Add(variablesViewer); + bot.Add(functionViewer); + bot.Add(moduleViewer); + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs.meta new file mode 100644 index 00000000..0a9be293 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/FunctionTimeline.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c2e7f0b3ef37bf24bb90cfc0bb1c6de0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs new file mode 100644 index 00000000..9bf8b430 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs @@ -0,0 +1,293 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.Experimental.GraphView; +using UnityEngine; +using UnityEngine.UIElements; +using Poiyomi.ModularShaderSystem.UI; + + +namespace Poiyomi.ModularShaderSystem.Debug +{ + public class TemplateGraph : IModularShaderDebuggerTab + { + public VisualElement TabContainer { get; set; } + public string TabName { get; set; } + + internal TemplateGraphView _graph; + + public TemplateGraph() + { + TabName = "Template graph"; + TabContainer = new VisualElement(); + TabContainer.StretchToParentSize(); + var styleSheet = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/TemplateGraphStyle"); + TabContainer.styleSheets.Add(styleSheet); + } + + public void UpdateTab(ModularShader shader) + { + TabContainer.Clear(); + if (shader == null) return; + _graph = new TemplateGraphView(shader); + + + + TabContainer.Add(_graph); + } + } + + internal class TemplateGraphView : GraphView + { + public List Nodes; + public List BaseNodes; + + private List _modules; + private ModularShader _shader; + + private static TextPopup _popup; + + public TemplateGraphView(ModularShader shader) + { + Nodes = new List(); + BaseNodes = new List(); + + _modules = shader.BaseModules.Concat(shader.AdditionalModules).ToList(); + _shader = shader; + + SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale); + this.AddManipulator(new ContentDragger()); + var grid = new GridBackground(); + + Insert(0, grid); + grid.StretchToParentSize(); + this.StretchToParentSize(); + + AddBaseTemplateNode("Shader", _shader.ShaderTemplate); + + if (_shader.UseTemplatesForProperties) + { + var keywords = new []{"#K#" + MSSConstants.TEMPLATE_PROPERTIES_KEYWORD}; + AddBaseTemplateNode("ShaderPropertiesRoot", new TemplateAsset{ Template = "", Keywords = keywords, name = "Properties Template Root"}); + if (_shader.ShaderPropertiesTemplate != null) AddTemplateNode("ShaderPropertiesTemplate", _shader.ShaderTemplate, keywords); + + } + + var moduleByTemplate = new Dictionary(); + foreach (var module in _shader.BaseModules.Concat(_shader.AdditionalModules)) + foreach (var template in module.Templates) + moduleByTemplate.Add(template, module); + + foreach (var template in _shader.BaseModules.Concat(_shader.AdditionalModules).SelectMany(x => x.Templates).OrderBy(x => x.Queue)) + { + if (template.Template == null) continue; + var module = moduleByTemplate[template]; + AddTemplateNode(module.Id, template); + } + + ScheduleNodesPositionReset(); + } + + public void AddBaseTemplateNode(string moduleId, TemplateAsset template) + { + var baseNode = new TemplateNode(moduleId, template, ""); + AddElement(baseNode); + Nodes.Add(baseNode); + BaseNodes.Add(baseNode); + } + + public void AddTemplateNode(string moduleId, ModuleTemplate template) + { + + var tempList = new List(); + foreach ((TemplateNode parent, string key) in Nodes.SelectMany(item => template.Keywords.Where(y => IsKeywordValid(moduleId, item, y)).Select(y => (item, y))).Where(x => !string.IsNullOrEmpty(x.Item2))) + { + var node = new TemplateNode(moduleId, template, key); + AddElement(node); + tempList.Add(node); + LinkTemplateNodes(parent, node, key); + } + Nodes.AddRange(tempList); + } + + public void AddTemplateNode(string moduleId, TemplateAsset template, string[] keywords) + { + var tempList = new List(); + foreach ((TemplateNode parent, string key) in Nodes.SelectMany(item => keywords.Where(y => IsKeywordValid(moduleId, item, y)).Select(y => (item, y))).Where(x => !string.IsNullOrEmpty(x.Item2))) + { + var node = new TemplateNode(moduleId, template, key); + AddElement(node); + tempList.Add(node); + LinkTemplateNodes(parent, node, key); + } + Nodes.AddRange(tempList); + } + + public void ScheduleNodesPositionReset() + { + RegisterCallback(GeometryChangedCallback); + } + + public override void BuildContextualMenu(ContextualMenuPopulateEvent evt) + { + var items = evt.menu.MenuItems(); + for (int i = 0; i < items.Count; i++) + evt.menu.RemoveItemAt(0); + + if (evt.target is TemplateNode node) + { + evt.menu.InsertAction(0,"View template code", action => + { + if (_popup != null) _popup.Close(); + _popup = ScriptableObject.CreateInstance(); + _popup.Text = node.TemplateAsset.Template; + var position = GUIUtility.GUIToScreenRect(node.worldBound); + int lineCount = _popup.Text == null ? 5 : _popup.Text.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None).Length; + _popup.ShowAsDropDown(position, new Vector2(600, Math.Min(lineCount * 16, 800))); + }); + if (node.ModuleId.Equals("Shader") || node.ModuleId.Equals("ShaderPropertiesRoot")) + { + evt.menu.InsertAction(1, "Select relative modular shader asset", action => + { + Selection.SetActiveObjectWithContext(_shader, _shader); + }); + } + else + { + evt.menu.InsertAction(1, "Select relative module asset", action => + { + var module = _modules.Find(x => x.Id.Equals(node.ModuleId)); + if(module != null) + Selection.SetActiveObjectWithContext(module, module); + }); + } + + } + } + + private void GeometryChangedCallback(GeometryChangedEvent evt) + { + UnregisterCallback(GeometryChangedCallback); + + if(BaseNodes.Count == 0) return; + + float top = 0; + foreach (TemplateNode node in BaseNodes) + top += node.Reposition(2, top, 100*(Nodes.Count/70 + 1)); + + var newPosition = new Vector3(BaseNodes[0].style.left.value.value + viewport.resolvedStyle.width/2 - BaseNodes[0].resolvedStyle.width/2, + -BaseNodes[0].style.top.value.value + viewport.resolvedStyle.height/2 - BaseNodes[0].resolvedStyle.height/2, + viewTransform.position.z); + viewTransform.position = newPosition; + } + + private static bool IsKeywordValid(string moduleId, TemplateNode item, string y) + { + if (item.ContainsKeyword("#K#"+y)) return true; + return item.ContainsKeyword("#KI#"+y) && moduleId.Equals(item.ModuleId); + } + + private void LinkTemplateNodes(TemplateNode left, TemplateNode right, string key) + { + var edge = new Edge + { + output = left.Outputs[key], + input = right.Input + }; + + edge.input.Connect(edge); + edge.output.Connect(edge); + edge.SetEnabled(false); + Add(edge); + } + } + + internal sealed class TemplateNode : Node + { + public TemplateAsset TemplateAsset { get; set; } + public string ModuleId { get; set; } + public Port Input { get; set; } + public Dictionary Outputs { get; set; } + + private ModuleTemplate _template; + + public TemplateNode(string moduleId, ModuleTemplate template, string key) : this (moduleId, template.Template, key) + { + _template = template; + + if (_template == null) return; + var priority = new Label("" +_template.Queue); + priority.AddToClassList("node-header-queue"); + titleContainer.Add(priority); + } + + public TemplateNode(string moduleId, TemplateAsset templateAsset, string key) + { + ModuleId = moduleId; + TemplateAsset = templateAsset; + title = TemplateAsset.name; + var idLabel = new Label($"({ModuleId})"); + idLabel.AddToClassList("node-header-id"); + titleContainer.Insert(1, idLabel); + Outputs = new Dictionary(); + + if (!string.IsNullOrEmpty(key)) + { + Input = InstantiatePort(Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, typeof(string)); + Input.portName = key; + Input.portColor = Color.cyan; + Input.edgeConnector.activators.Clear(); + inputContainer.Add(Input); + } + + foreach (string keyword in TemplateAsset.Keywords) + { + var port = InstantiatePort(Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, typeof(string)); + + string sanitizedKeyword = keyword.Replace("#K#", "").Replace("#KI#", ""); + bool isInternal = keyword.StartsWith("#KI#"); + port.portName = sanitizedKeyword + (isInternal ? "(i)" : ""); + port.portColor = Color.cyan; + port.edgeConnector.activators.Clear(); + Outputs.Add(sanitizedKeyword, port); + outputContainer.Add(port); + } + + RefreshExpandedState(); + RefreshPorts(); + } + + public float Reposition(float right, float top, float offset) + { + float width = resolvedStyle.width; + float height = resolvedStyle.height; + + float childrenHeight = 0; + float newTop = top; + + foreach (var output in Outputs.Values) + { + foreach (var edge in output.connections) + { + var node = edge.input.node as TemplateNode; + if (node != null) + { + childrenHeight += node.Reposition(right + width + offset, newTop, offset); + newTop = top + childrenHeight; + } + } + } + SetPosition(new Rect(right, top + Math.Max((childrenHeight - height)/2, 0), 100, 100)); + RefreshExpandedState(); + RefreshPorts(); + + return Math.Max(height, childrenHeight) + 4; + } + + public bool ContainsKeyword(string keyword) + { + return TemplateAsset.Keywords.Contains(keyword); + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs.meta new file mode 100644 index 00000000..e4084c2c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Components/TemplateGraph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a58025042953bc1429b3e1a8684be12f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers.meta new file mode 100644 index 00000000..8c8efc2c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a80f0c817257bb43bc624af1073b13f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs new file mode 100644 index 00000000..f33a10cb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs @@ -0,0 +1,30 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + [CustomPropertyDrawer(typeof(EnableProperty))] + public class EnablePropertyDrawer : PropertyDrawer + { + private VisualElement _root; + + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + _root = new VisualElement(); + + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/EnablePropertyDrawer"); + VisualElement template = visualTree.CloneTree(); + var foldout = new Foldout(); + foldout.text = property.displayName; + foldout.RegisterValueChangedCallback((e) => property.isExpanded = e.newValue); + foldout.value = property.isExpanded; + + foldout.Add(template); + _root.Add(foldout); + + return _root; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs.meta new file mode 100644 index 00000000..5f11f5c6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/EnablePropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ffc75a109a78eb846a6b3708786e1a50 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs new file mode 100644 index 00000000..d84eb1e4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs @@ -0,0 +1,32 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + [CustomPropertyDrawer(typeof(ShaderFunction))] + public class FunctionPropertyDrawer : PropertyDrawer + { + private VisualElement _root; + + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + _root = new VisualElement(); + + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/FunctionPropertyDrawer"); + VisualElement template = visualTree.CloneTree(); + var foldout = new Foldout(); + foldout.text = property.displayName; + foldout.RegisterValueChangedCallback((e) => property.isExpanded = e.newValue); + foldout.value = property.isExpanded; + + var nameField = template.Q("Name"); + nameField.RegisterValueChangedCallback(evt => foldout.text = evt.newValue); + + foldout.Add(template); + _root.Add(foldout); + + return _root; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs.meta new file mode 100644 index 00000000..e8fb2bf6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/FunctionPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 24f1782728098f349aee99d57e62f501 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs new file mode 100644 index 00000000..2d2c77b8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs @@ -0,0 +1,29 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + [CustomPropertyDrawer(typeof(ModuleTemplate))] + public class ModuleTemplatePropertyDrawer : PropertyDrawer + { + private VisualElement _root; + + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + _root = new VisualElement(); + + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/ModuleTemplatePropertyDrawer"); + VisualElement template = visualTree.CloneTree(); + var foldout = new Foldout(); + foldout.text = property.displayName; + foldout.RegisterValueChangedCallback((e) => property.isExpanded = e.newValue); + foldout.value = property.isExpanded; + foldout.Add(template); + _root.Add(foldout); + + return _root; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs.meta new file mode 100644 index 00000000..4f655a68 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ModuleTemplatePropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21bc47d4c53206845ba7ea3ecdada7d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs new file mode 100644 index 00000000..2221cd03 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs @@ -0,0 +1,52 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public class PropertyAttributeAttribute : PropertyAttribute + { + } + [CustomPropertyDrawer(typeof(PropertyAttributeAttribute))] + public class PropertyAttributeDrawer : PropertyDrawer + { + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + var root = new VisualElement(); + + var value = new TextField(); + value.SetValueWithoutNotify(property.stringValue); + root.Add(value); + + /*value.RegisterValueChangedCallback(evt => + { + property.stringValue = evt.newValue; + property.serializedObject.ApplyModifiedProperties(); + });*/ + value.RegisterCallback(evt => + { + string v = value.value; + if (v[v.Length - 1] == ']') + { + v = v.Remove(v.Length - 1, 1); + } + if (v[0] == '[') + { + v = v.Remove(0, 1); + } + property.stringValue = v; + value.SetValueWithoutNotify(property.stringValue); + property.serializedObject.ApplyModifiedProperties(); + }); + + /*customTypeField.style.display = ((VariableType)typeField.value) == VariableType.Custom ? DisplayStyle.Flex : DisplayStyle.None; + + typeField.RegisterValueChangedCallback(e => + { + customTypeField.style.display = ((VariableType)e.newValue) == VariableType.Custom ? DisplayStyle.Flex : DisplayStyle.None; + });*/ + + return root; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs.meta new file mode 100644 index 00000000..105176a5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/PropertyAttributeDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a66ad23d96a7a849ad93d53ea328d0e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs new file mode 100644 index 00000000..a41154a4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs @@ -0,0 +1,289 @@ +using System; +using System.Linq; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; +using UnityEngine.Analytics; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public enum DefaultTextureValue + { + White, + Black, + Gray, + Bump, + } + + [CustomPropertyDrawer(typeof(Property))] + public class ShaderPropertyDrawer : PropertyDrawer + { + private VisualElement _root; + + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + _root = new VisualElement(); + + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/ShaderPropertyDrawer"); + VisualElement template = visualTree.CloneTree(); + var foldout = new Foldout(); + foldout.text = property.displayName; + foldout.RegisterValueChangedCallback((e) => property.isExpanded = e.newValue); + foldout.value = property.isExpanded; + + var nameField = template.Q("Name"); + nameField.RegisterValueChangedCallback(evt => foldout.text = evt.newValue); + var enumField = template.Q("TypeField"); + var valueContainer = template.Q("ValueContainer"); + + var type = property.FindPropertyRelative("Type"); + var defaultValue = property.FindPropertyRelative("DefaultValue"); + + var propType = GetPropertyTypeFromSerializedProperty(type.stringValue); + + enumField.Init(propType); + + enumField.value = propType; + + enumField.RegisterValueChangedCallback(e => + { + SetPropType(type, (PropertyType)e.newValue); + SetPropDefaultValue(defaultValue,""); + UpdateValueContainer(property, defaultValue, type, (PropertyType)e.newValue, type.stringValue, defaultValue.stringValue, valueContainer); + }); + + UpdateValueContainer(property, defaultValue, type, propType, type.stringValue, defaultValue.stringValue, valueContainer); + + foldout.Add(template); + _root.Add(foldout); + return _root; + } + + private void SetPropDefaultValue(SerializedProperty defaultValue, string v) + { + defaultValue.stringValue = v; + defaultValue.serializedObject.ApplyModifiedProperties(); + } + + private void SetPropType(SerializedProperty type, string v) + { + type.stringValue = v; + type.serializedObject.ApplyModifiedProperties(); + } + + private void SetPropType(SerializedProperty propType, PropertyType type) + { + string typeString = ""; + switch (type) + { + case PropertyType.Int: typeString = "Int"; break; + case PropertyType.Float: typeString = "Float"; break; + case PropertyType.Range: typeString = "Range(0, 1)"; break; + case PropertyType.Vector: typeString = "Vector"; break; + case PropertyType.Color: typeString = "Color"; break; + case PropertyType.Texture2D: typeString = "2D"; break; + case PropertyType.Texture2DArray: typeString = "2DArray"; break; + case PropertyType.Cube: typeString = "Cube"; break; + case PropertyType.CubeArray: typeString = "CubeArray"; break; + case PropertyType.Texture3D: typeString = "3d"; break; + } + + propType.stringValue = typeString; + propType.serializedObject.ApplyModifiedProperties(); + } + + private void UpdateValueContainer(SerializedProperty property, SerializedProperty defaultValue, SerializedProperty type, PropertyType propType, string propTypeString, string propValue, VisualElement element) + { + VisualElement field = null; + switch (propType) + { + case PropertyType.Float: + float floatValue = 0; + if (float.TryParse(propValue, out float f)) floatValue = f; + else SetPropDefaultValue(defaultValue,"" + floatValue); + var flfield = new FloatField{ value = floatValue, label = "Default value"}; + flfield.RegisterValueChangedCallback(e => SetPropDefaultValue(defaultValue, "" + e.newValue)); + field = flfield; + break; + case PropertyType.Range: + + field = new VisualElement(); + var rangeLimits = new Vector2(0, 1); + float rangeValue = 0; + + string[] prt = propTypeString.Replace("Range(","").Replace(")","").Split(','); + float[] prv = new float[2]; + bool pfi = true; + for (int i = 0; i < 2; i++) + { + if (float.TryParse(prt[i], out float v)) + { + prv[i] = v; + } + else + { + pfi = false; + break; + } + } + if (pfi) rangeLimits = new Vector2(prv[0], prv[1]); + else SetPropType(type, $"Range({prv[0]}, {prv[1]})"); + + var limits = new Vector2Field { label = "Range limits", value = rangeLimits }; + + if (float.TryParse(propValue, out float r)) rangeValue = r; + else SetPropDefaultValue(defaultValue,"" + rangeValue); + var horizontalElement = new VisualElement(); + horizontalElement.style.flexDirection = FlexDirection.Row; + + var valueSlider = new Slider + { + value = rangeValue, + lowValue = Math.Min(rangeLimits[0], rangeLimits[1]), + highValue = Math.Max(rangeLimits[0], rangeLimits[1]), + + label = "Default value" + }; + valueSlider.style.flexGrow = 1; + var valueField = new FloatField { value = rangeValue }; + valueField.style.width = 30; + + limits.RegisterValueChangedCallback(e => + { + valueSlider.lowValue = Math.Min(e.newValue[0], e.newValue[1]); + valueSlider.highValue = Math.Max(e.newValue[0], e.newValue[1]); + SetPropType(type,$"Range({valueSlider.lowValue}, {valueSlider.highValue})"); + }); + + valueField.RegisterValueChangedCallback(e => + { + if (e.newValue > valueSlider.highValue || e.newValue < valueSlider.lowValue) + { + e.StopImmediatePropagation(); + e.PreventDefault(); + valueField.SetValueWithoutNotify(e.previousValue); + return; + } + valueSlider.SetValueWithoutNotify(e.newValue); + SetPropDefaultValue(defaultValue,"" + e.newValue); + }); + valueSlider.RegisterValueChangedCallback(e => + { + valueField.SetValueWithoutNotify(e.newValue); + SetPropDefaultValue(defaultValue,"" + e.newValue); + }); + + field.Add(limits); + horizontalElement.Add(valueSlider); + horizontalElement.Add(valueField); + field.Add(horizontalElement); + + break; + case PropertyType.Int: + int intValue = 0; + if (int.TryParse(propValue, out int iv)) intValue = iv; + else SetPropDefaultValue(defaultValue,"" + intValue); + var ivfield = new IntegerField{ value = intValue, label = "Default value"}; + field = ivfield; + ivfield.RegisterValueChangedCallback(e => SetPropDefaultValue(defaultValue,"" + e.newValue)); + break; + case PropertyType.Color: + Color colorValue = Color.white; + string[] clvl = propValue.Replace("(","").Replace(")","").Split(','); + float[] fv = new float[4]; + bool vfi = true; + for (int i = 0; i < 4; i++) + { + if (float.TryParse(clvl[i], out float v)) + { + fv[i] = v; + } + else + { + vfi = false; + break; + } + } + + if (vfi) colorValue = new Color(fv[0], fv[1], fv[2], fv[3]); + else SetPropDefaultValue(defaultValue,$"({colorValue[0]}, {colorValue[1]}, {colorValue[2]}, {colorValue[3]})"); + var clfield = new ColorField { value = colorValue, label = "Default value" }; + field = clfield; + clfield.RegisterValueChangedCallback(e => SetPropDefaultValue(defaultValue,$"({e.newValue[0]}, {e.newValue[1]}, {e.newValue[2]}, {e.newValue[3]})")); + break; + case PropertyType.Vector: + Vector4 vectorValue = Vector4.zero; + string[] vvl = propValue.Replace("(","").Replace(")","").Split(','); + float[] vv = new float[4]; + bool vvi = true; + for (int i = 0; i < 4; i++) + { + if (float.TryParse(vvl[i], out float v)) + { + vv[i] = v; + } + else + { + vvi = false; + break; + } + } + if (vvi) vectorValue = new Vector4(vv[0], vv[1], vv[2] ,vv[3]); + else SetPropDefaultValue(defaultValue,$"({vv[0]}, {vv[1]}, {vv[2]}, {vv[3]})"); + var vlfield = new Vector4Field{ value = vectorValue, label = "Default value" }; + field = vlfield; + vlfield.RegisterValueChangedCallback(e => SetPropDefaultValue(defaultValue,$"({e.newValue[0]}, {e.newValue[1]}, {e.newValue[2]}, {e.newValue[3]})")); + break; + case PropertyType.Texture2D: + var texValue = DefaultTextureValue.White; + if (propValue.Contains("white")) texValue = DefaultTextureValue.White; + if (propValue.Contains("gray")) texValue = DefaultTextureValue.Gray; + if (propValue.Contains("black")) texValue = DefaultTextureValue.Black; + if (propValue.Contains("bump")) texValue = DefaultTextureValue.Bump; + SetPropDefaultValue(defaultValue,$"\"{Enum.GetName(typeof(DefaultTextureValue), texValue)?.ToLower()}\" {{}}"); + var txfield = new EnumField { label = "Default value" }; + txfield.Init(texValue); + var textureAsset = new PropertyField(property.FindPropertyRelative("DefaultTextureAsset"), "Texture Override"); + textureAsset.Bind(property.serializedObject); + var vl = new VisualElement(); + vl.Add(txfield); + vl.Add(textureAsset); + field = vl; + txfield.RegisterValueChangedCallback(e => SetPropDefaultValue(defaultValue,$"\"{Enum.GetName(typeof(DefaultTextureValue), e.newValue)?.ToLower()}\" {{}}")); + break; + case PropertyType.Texture2DArray: + case PropertyType.CubeArray: + case PropertyType.Texture3D: + SetPropDefaultValue(defaultValue,"\"\"{}"); + break; + case PropertyType.Cube: + SetPropDefaultValue(defaultValue,"\"\"{}"); + var textureCubeAsset = new PropertyField(property.FindPropertyRelative("DefaultTextureAsset"), "Texture Override"); + textureCubeAsset.Bind(property.serializedObject); + field = textureCubeAsset; + break; + } + + element.Clear(); + if (field != null) element.Add(field); + } + + private static PropertyType GetPropertyTypeFromSerializedProperty(string propType) + { + switch (propType.Trim()) + { + case "Float": return PropertyType.Float; + case "Int": return PropertyType.Int; + case "Color": return PropertyType.Color; + case "Vector": return PropertyType.Vector; + case "2D": return PropertyType.Texture2D; + case "3D": return PropertyType.Texture3D; + case "Cube": return PropertyType.Cube; + case "2DArray": return PropertyType.Texture2DArray; + case "CubeArray": return PropertyType.CubeArray; + default: return propType.Trim().StartsWith("Range") ? PropertyType.Range : PropertyType.Float; + } + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs.meta new file mode 100644 index 00000000..a638df90 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/ShaderPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eef114f99927e5d4b98ba893786d3838 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs new file mode 100644 index 00000000..3bdfd831 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs @@ -0,0 +1,43 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + [CustomPropertyDrawer(typeof(Variable))] + public class VariablePropertyDrawer : PropertyDrawer + { + private VisualElement _root; + + public override VisualElement CreatePropertyGUI(SerializedProperty property) + { + _root = new VisualElement(); + + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/VariablePropertyDrawer"); + VisualElement template = visualTree.CloneTree(); + var foldout = new Foldout(); + foldout.text = property.displayName; + foldout.RegisterValueChangedCallback((e) => property.isExpanded = e.newValue); + foldout.value = property.isExpanded; + foldout.Add(template); + _root.Add(foldout); + + var nameField = template.Q("Name"); + nameField.RegisterValueChangedCallback(evt => foldout.text = evt.newValue); + var typeField = template.Q("Type"); + var customTypeField = template.Q("CustomType"); + + typeField.Init(VariableType.Float); + + customTypeField.style.display = ((VariableType)typeField.value) == VariableType.Custom ? DisplayStyle.Flex : DisplayStyle.None; + + typeField.RegisterValueChangedCallback(e => + { + customTypeField.style.display = ((VariableType)e.newValue) == VariableType.Custom ? DisplayStyle.Flex : DisplayStyle.None; + }); + + return _root; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs.meta new file mode 100644 index 00000000..b6b5f0fa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Drawers/VariablePropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9d92791b337f5ca4984e6d33748e19a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements.meta new file mode 100644 index 00000000..ec87ef6f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 593f19fde7643b4429fd5f6a8503214b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs new file mode 100644 index 00000000..3ad05abf --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs @@ -0,0 +1,104 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public class CodeViewElement : VisualElement + { + private class LineItem : VisualElement + { + private static Font TextFont + { + get + { + if (_font == null) + _font = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/RobotoMono-Regular"); + return _font; + } + } + + private static Font _font; + private Label _lineNumber; + private Label _line; + public string Text { get; } + + public LineItem() : this(0, "") {} + + public LineItem(int number, string text, int digits = 0) + { + Text = text; + _lineNumber = new Label("" + number); + _lineNumber.style.color = Color.gray; + _lineNumber.style.width = digits == 0 ? 30 : digits * 8; + _lineNumber.style.unityTextAlign = TextAnchor.MiddleRight; + _lineNumber.style.unityFont = TextFont; + _lineNumber.style.marginRight = 4; + _lineNumber.style.marginLeft = 4; + + _line = new Label(text); + _line.style.flexGrow = 1; + _line.style.unityFont = TextFont; + + style.flexDirection = FlexDirection.Row; + Add(_lineNumber); + Add(_line); + } + + public void SetText(int i, string textLine, int digits) + { + _lineNumber.text = "" + i; + _lineNumber.style.width = digits == 0 ? 30 : digits * 8; + _line.text = textLine; + _line.MeasureTextSize(textLine, 0, MeasureMode.Exactly, 0, MeasureMode.Exactly); + } + } + + public string Text + { + get => string.Join("\n", _textLines); + set + { + _textLines = value == null ? Array.Empty() : value.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); + _digits = (int)Math.Floor(Math.Log10(_textLines.Length) + 1); + _listView.itemsSource = _textLines; + + float width =((_textLines.Length == 0 ? 0 : _textLines.Max(x => x.Length)) + _digits + 1) * 10; + _listView.contentContainer.style.width = width; + } + } + + public int LineCount => _textLines.Length; + + private Label _templateLabel; + private string[] _textLines; + private ListView _listView; + private int _digits; + + public CodeViewElement() + { + ScrollView s = new ScrollView(ScrollViewMode.Horizontal); + _listView = new ListView(); + _listView.itemHeight = 15; + _listView.AddToClassList("unity-base-text-field__input"); + _listView.AddToClassList("unity-text-field__input"); + _listView.AddToClassList("unity-base-field__input"); + _listView.style.flexGrow = 1; + _listView.contentContainer.style.flexGrow = 1; + + Func makeItem = () => new LineItem(); + Action bindItem = (e, i) => (e as LineItem).SetText(i+1, _textLines[i], _digits); + + _listView.makeItem = makeItem; + _listView.bindItem = bindItem; + _listView.selectionType = SelectionType.None; + s.Add(_listView); + Add(s); + s.style.flexGrow = 1; + s.contentContainer.style.flexGrow = 1; + + style.flexGrow = 1; + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs.meta new file mode 100644 index 00000000..69417247 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/CodeViewElement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 248ba9991fe7ba44d8ed907de6a5e4d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs new file mode 100644 index 00000000..60eff417 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs @@ -0,0 +1,324 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public interface IInspectorList + { + InspectorListItem draggedElement { get; set; } + void HighlightDrops(); + void DeHighlightDrops(); + } + + public class InspectorList : BindableElement, IInspectorList + { + Foldout _listContainer; + Button _addButton; + SerializedProperty _array; + private bool _showElementsButtons; + + private bool _hasFoldingBeenForced; + + public InspectorListItem draggedElement { get; set; } + public bool _highlightDrops; + + private List _drops; + + private VisualElement _currentDrop; + + public InspectorList() + { + _drops = new List(); + _listContainer = new Foldout(); + _listContainer.text = "Unbound List"; + _listContainer.contentContainer.AddToClassList("inspector-list-container"); + _listContainer.value = false; + _listContainer.RegisterCallback(e => Drop()); + _listContainer.RegisterCallback(e => Drop()); + + _addButton = new Button(AddItem); + _addButton.text = "Add"; + _addButton.AddToClassList("inspector-list-add-button"); + Add(_listContainer); + if (enabledSelf) + _listContainer.Add(_addButton); + _listContainer.RegisterValueChangedCallback((e) => _array.isExpanded = e.newValue); + var styleSheet = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/InspectorList"); + styleSheets.Add(styleSheet); + } + + private void Drop() + { + if (draggedElement == null) return; + draggedElement.RemoveFromClassList("inspector-list-drag-enabled"); + + if (_highlightDrops) + { + DeHighlightDrops(); + int dropIndex = _drops.IndexOf(_currentDrop); + + if (dropIndex == -1) + { + draggedElement = null; + return; + } + + if (dropIndex > draggedElement.index) dropIndex--; + _array.MoveArrayElement(draggedElement.index, dropIndex); + bool expanded = _array.GetArrayElementAtIndex(dropIndex).isExpanded; + _array.GetArrayElementAtIndex(dropIndex).isExpanded = _array.GetArrayElementAtIndex(draggedElement.index).isExpanded; + _array.GetArrayElementAtIndex(draggedElement.index).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + UpdateList(); + } + draggedElement = null; + } + + public void HighlightDrops() + { + foreach (var item in _drops) + item.AddToClassList("inspector-list-drop-area-highlight"); + + _highlightDrops = true; + } + + public void DeHighlightDrops() + { + foreach (var item in _drops) + item.RemoveFromClassList("inspector-list-drop-area-highlight"); + + _highlightDrops = false; + } + + public override void HandleEvent(EventBase evt) + { + var type = evt.GetType(); //SerializedObjectBindEvent is internal, so need to use reflection here + if ((type.Name == "SerializedPropertyBindEvent") && !string.IsNullOrWhiteSpace(bindingPath)) + { + var obj = type.GetProperty("bindProperty")?.GetValue(evt) as SerializedProperty; + _array = obj; + if (obj != null) + { + if (_hasFoldingBeenForced) obj.isExpanded = _listContainer.value; + else _listContainer.value = obj.isExpanded; + } + UpdateList(); + } + base.HandleEvent(evt); + } + + public void UpdateList() + { + _listContainer.Clear(); + _drops.Clear(); + + if (_array == null) + return; + _listContainer.text = _array.displayName; + CreateDrop(); + for (int i = 0; i < _array.arraySize; i++) + { + int index = i; + var element = new PropertyField(_array.GetArrayElementAtIndex(index)); + element.Bind(_array.GetArrayElementAtIndex(index).serializedObject); + var item = new InspectorListItem(this, element, _array, index, _showElementsButtons); + item.removeButton.RegisterCallback((evt) => RemoveItem(index)); + item.upButton.RegisterCallback((evt) => MoveUpItem(index)); + item.downButton.RegisterCallback((evt) => MoveDownItem(index)); + _listContainer.Add(item); + CreateDrop(); + } + if (enabledSelf) + _listContainer.Add(_addButton); + } + + private void CreateDrop() + { + VisualElement dropArea = new VisualElement(); + dropArea.AddToClassList("inspector-list-drop-area"); + dropArea.RegisterCallback(e => + { + if (_highlightDrops) + { + dropArea.AddToClassList("inspector-list-drop-area-selected"); + _currentDrop = dropArea; + } + }); + dropArea.RegisterCallback(e => + { + if (_highlightDrops) + { + dropArea.RemoveFromClassList("inspector-list-drop-area-selected"); + if (_currentDrop == dropArea) _currentDrop = null; + } + }); + + _listContainer.Add(dropArea); + _drops.Add(dropArea); + } + + public void RemoveItem(int index) + { + if (_array != null) + { + if (index < _array.arraySize - 1) + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index + 1).isExpanded; + _array.DeleteArrayElementAtIndex(index); + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void MoveUpItem(int index) + { + if (_array != null && index > 0) + { + _array.MoveArrayElement(index, index - 1); + bool expanded = _array.GetArrayElementAtIndex(index).isExpanded; + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index - 1).isExpanded; + _array.GetArrayElementAtIndex(index - 1).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void MoveDownItem(int index) + { + if (_array != null && index < _array.arraySize - 1) + { + _array.MoveArrayElement(index, index + 1); + bool expanded = _array.GetArrayElementAtIndex(index).isExpanded; + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index + 1).isExpanded; + _array.GetArrayElementAtIndex(index + 1).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void AddItem() + { + if (_array != null) + { + _array.InsertArrayElementAtIndex(_array.arraySize); + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void SetFoldingState(bool open) + { + _listContainer.value = open; + if (_array != null) _array.isExpanded = open; + else _hasFoldingBeenForced = true; + } + + public new class UxmlFactory : UxmlFactory { } + + public new class UxmlTraits : BindableElement.UxmlTraits + { + UxmlBoolAttributeDescription showElements = + new UxmlBoolAttributeDescription { name = "show-elements-text", defaultValue = true }; + + public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) + { + base.Init(ve, bag, cc); + + if (ve is InspectorList ate) ate._showElementsButtons = showElements.GetValueFromBag(bag, cc); + } + } + + } + + public class InspectorListItem : VisualElement + { + public Button removeButton; + public Button upButton; + public Button downButton; + + public VisualElement dragArea; + + public Vector2 startPosition; + + public int index; + + private IInspectorList _list; + public InspectorListItem(IInspectorList list, VisualElement element, SerializedProperty array, int index, bool showButtonsText) + { + this.index = index; + _list = list; + AddToClassList("inspector-list-item-container"); + + dragArea = new VisualElement(); + dragArea.AddToClassList("inspector-list-drag-handle"); + + dragArea.RegisterCallback(e => + { + if (_list.draggedElement == this) + { + e.StopImmediatePropagation(); + return; + } + + _list.draggedElement = this; + _list.HighlightDrops(); + AddToClassList("inspector-list-drag-enabled"); + }); + + VisualElement buttonsArea = new VisualElement(); + + RegisterCallback(e => + { + buttonsArea.ClearClassList(); + if (e.newRect.height > 60) + { + buttonsArea.AddToClassList("inspector-list-buttons-container-vertical"); + buttonsArea.Add(removeButton); + buttonsArea.Add(upButton); + buttonsArea.Add(downButton); + } + else + { + buttonsArea.AddToClassList("inspector-list-buttons-container-horizontal"); + buttonsArea.Add(upButton); + buttonsArea.Add(downButton); + buttonsArea.Add(removeButton); + } + }); + + upButton = new Button(); + upButton.name = "UpInspectorListItem"; + upButton.AddToClassList("inspector-list-up-button"); + if (index == 0) + upButton.SetEnabled(false); + downButton = new Button(); + downButton.name = "DownInspectorListItem"; + downButton.AddToClassList("inspector-list-down-button"); + if (index >= array.arraySize - 1) + downButton.SetEnabled(false); + removeButton = new Button(); + removeButton.name = "RemoveInspectorListItem"; + removeButton.AddToClassList("inspector-list-remove-button"); + + if (showButtonsText) + { + upButton.text = "up"; + downButton.text = "down"; + removeButton.text = "-"; + } + + var property = array.GetArrayElementAtIndex(index); + element.AddToClassList("inspector-list-item"); + + Add(dragArea); + Add(element); + Add(buttonsArea); + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs.meta new file mode 100644 index 00000000..5839937e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/InspectorList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e402c0aaa42fe944802ceaf7d55be05 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs new file mode 100644 index 00000000..6f2f9955 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs @@ -0,0 +1,56 @@ +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public class LabelField : VisualElement + { + public string Label + { + get => _label; + set + { + _label = value; + _labelField.text = _label; + } + } + + public string Value + { + get => _value; + set + { + _value = value; + _valueField.text = _value; + } + } + + private Label _labelField; + private Label _valueField; + private string _label; + private string _value; + + public LabelField(string label, string value) + { + _label = label; + _value = value; + _labelField = new Label(label); + _valueField = new Label(value); + + AddToClassList("unity-base-field"); + AddToClassList("unity-base-text-field"); + AddToClassList("unity-text-field"); + + _labelField.AddToClassList("unity-text-element"); + _labelField.AddToClassList("unity-label"); + _labelField.AddToClassList("unity-base-field__label"); + _labelField.AddToClassList("unity-base-text-field__label"); + _labelField.AddToClassList("unity-text-field__label"); + _labelField.AddToClassList("label-field-title"); + _valueField.AddToClassList("label-field-value"); + + Add(_labelField); + Add(_valueField); + + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs.meta new file mode 100644 index 00000000..f7dffca5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/LabelField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: af8a36edfa0c0a44d971881746edc521 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs new file mode 100644 index 00000000..7a80493e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs @@ -0,0 +1,315 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + + public class ModuleInspectorList : BindableElement, IInspectorList + { + Foldout _listContainer; + Button _addButton; + SerializedProperty _array; + private bool _showElementsButtons; + private List _loadedModules; + + private bool _hasFoldingBeenForced; + + public InspectorListItem draggedElement { get; set; } + public bool _highlightDrops; + + private List _drops; + + private VisualElement _currentDrop; + + public ModuleInspectorList() + { + _drops = new List(); + _listContainer = new Foldout(); + _listContainer.text = "Unbound List"; + _listContainer.contentContainer.AddToClassList("inspector-list-container"); + _listContainer.value = false; + _listContainer.RegisterCallback(e => Drop()); + _listContainer.RegisterCallback(e => Drop()); + + _addButton = new Button(AddItem); + _addButton.text = "Add"; + _addButton.AddToClassList("inspector-list-add-button"); + Add(_listContainer); + if (enabledSelf) + _listContainer.Add(_addButton); + _listContainer.RegisterValueChangedCallback((e) => _array.isExpanded = e.newValue); + var styleSheet = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/InspectorList"); + styleSheets.Add(styleSheet); + } + + private void Drop() + { + if (draggedElement == null) return; + draggedElement.RemoveFromClassList("inspector-list-drag-enabled"); + + if (_highlightDrops) + { + DeHighlightDrops(); + int dropIndex = _drops.IndexOf(_currentDrop); + + if (dropIndex == -1) + { + draggedElement = null; + return; + } + + if (dropIndex > draggedElement.index) dropIndex--; + _array.MoveArrayElement(draggedElement.index, dropIndex); + bool expanded = _array.GetArrayElementAtIndex(dropIndex).isExpanded; + _array.GetArrayElementAtIndex(dropIndex).isExpanded = _array.GetArrayElementAtIndex(draggedElement.index).isExpanded; + _array.GetArrayElementAtIndex(draggedElement.index).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + UpdateList(); + } + draggedElement = null; + } + + public void HighlightDrops() + { + foreach (var item in _drops) + item.AddToClassList("inspector-list-drop-area-highlight"); + + _highlightDrops = true; + } + + public void DeHighlightDrops() + { + foreach (var item in _drops) + item.RemoveFromClassList("inspector-list-drop-area-highlight"); + + _highlightDrops = false; + } + + public override void HandleEvent(EventBase evt) + { + var type = evt.GetType(); //SerializedObjectBindEvent is internal, so need to use reflection here + if ((type.Name == "SerializedPropertyBindEvent") && !string.IsNullOrWhiteSpace(bindingPath)) + { + var obj = type.GetProperty("bindProperty")?.GetValue(evt) as SerializedProperty; + _array = obj; + if (obj != null) + { + if (_hasFoldingBeenForced) obj.isExpanded = _listContainer.value; + else _listContainer.value = obj.isExpanded; + } + UpdateList(); + } + base.HandleEvent(evt); + } + + public void UpdateList() + { + _listContainer.Clear(); + _drops.Clear(); + + if (_array == null) + return; + _listContainer.text = _array.displayName; + CreateDrop(); + + _loadedModules = new List(); + for (int i = 0; i < _array.arraySize; i++) + { + if (_array.GetArrayElementAtIndex(i).objectReferenceValue != null) + _loadedModules.Add(((ShaderModule)_array.GetArrayElementAtIndex(i).objectReferenceValue)?.Id); + } + + + + for (int i = 0; i < _array.arraySize; i++) + { + int index = i; + + var moduleItem = new VisualElement(); + var objectField = new ObjectField();//_array.GetArrayElementAtIndex(index)); + + SerializedProperty propertyValue = _array.GetArrayElementAtIndex(index); + + objectField.objectType = typeof(ShaderModule); + objectField.bindingPath = propertyValue.propertyPath; + objectField.Bind(propertyValue.serializedObject); + var infoLabel = new Label(); + moduleItem.Add(objectField); + moduleItem.Add(infoLabel); + + objectField.RegisterCallback>(x => + { + var newValue = (ShaderModule)x.newValue; + var oldValue = (ShaderModule)x.previousValue; + + if (oldValue != null) + _loadedModules.Remove(oldValue.Id); + if (newValue != null) + _loadedModules.Add(newValue.Id); + + for (int j = 0; j < _array.arraySize; j++) + { + var element = ((ObjectField)x.target).parent.parent.parent.ElementAt(j*2+1).ElementAt(1); + Label label = element.ElementAt(1) as Label; + if (index == j) + CheckModuleValidity(newValue, label, element); + else + CheckModuleValidity((ShaderModule)_array.GetArrayElementAtIndex(j).objectReferenceValue, label, element); + } + }); + + var item = new InspectorListItem(this, moduleItem, _array, index, _showElementsButtons); + item.removeButton.RegisterCallback((evt) => RemoveItem(index)); + item.upButton.RegisterCallback((evt) => MoveUpItem(index)); + item.downButton.RegisterCallback((evt) => MoveDownItem(index)); + _listContainer.Add(item); + CreateDrop(); + + CheckModuleValidity((ShaderModule)propertyValue.objectReferenceValue, infoLabel, moduleItem); + } + if (enabledSelf) + _listContainer.Add(_addButton); + } + + private void CreateDrop() + { + VisualElement dropArea = new VisualElement(); + dropArea.AddToClassList("inspector-list-drop-area"); + dropArea.RegisterCallback(e => + { + if (_highlightDrops) + { + dropArea.AddToClassList("inspector-list-drop-area-selected"); + _currentDrop = dropArea; + } + }); + dropArea.RegisterCallback(e => + { + if (_highlightDrops) + { + dropArea.RemoveFromClassList("inspector-list-drop-area-selected"); + if (_currentDrop == dropArea) _currentDrop = null; + } + }); + + _listContainer.Add(dropArea); + _drops.Add(dropArea); + } + + private void CheckModuleValidity(ShaderModule newValue, Label infoLabel, VisualElement moduleItem) + { + + List problems = new List(); + + if (newValue != null) + { + var moduleId = newValue.Id; + if (_loadedModules.Count(y => y.Equals(moduleId)) > 1) + problems.Add("The module is duplicate"); + + List missingDependencies = newValue.ModuleDependencies.Where(dependency => _loadedModules.Count(y => y.Equals(dependency)) == 0).ToList(); + List incompatibilities = newValue.IncompatibleWith.Where(dependency => _loadedModules.Count(y => y.Equals(dependency)) > 0).ToList(); + + if (missingDependencies.Count > 0) + problems.Add("Missing dependencies: " + string.Join(", ", missingDependencies)); + + if (incompatibilities.Count > 0) + problems.Add("These incompatible modules are installed: " + string.Join(", ", incompatibilities)); + } + + infoLabel.text = string.Join("\n", problems); + + if (!string.IsNullOrWhiteSpace(infoLabel.text)) + { + moduleItem.AddToClassList("error-background"); + infoLabel.visible = true; + } + else + { + moduleItem.RemoveFromClassList("error-background"); + infoLabel.visible = false; + } + } + + public void RemoveItem(int index) + { + if (_array != null) + { + if (index < _array.arraySize - 1) + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index + 1).isExpanded; + var elementProperty = _array.GetArrayElementAtIndex(index); + if (elementProperty.objectReferenceValue != null) + elementProperty.objectReferenceValue = null; + _array.DeleteArrayElementAtIndex(index); + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void MoveUpItem(int index) + { + if (_array != null && index > 0) + { + _array.MoveArrayElement(index, index - 1); + bool expanded = _array.GetArrayElementAtIndex(index).isExpanded; + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index - 1).isExpanded; + _array.GetArrayElementAtIndex(index - 1).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void MoveDownItem(int index) + { + if (_array != null && index < _array.arraySize - 1) + { + _array.MoveArrayElement(index, index + 1); + bool expanded = _array.GetArrayElementAtIndex(index).isExpanded; + _array.GetArrayElementAtIndex(index).isExpanded = _array.GetArrayElementAtIndex(index + 1).isExpanded; + _array.GetArrayElementAtIndex(index + 1).isExpanded = expanded; + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void AddItem() + { + if (_array != null) + { + _array.InsertArrayElementAtIndex(_array.arraySize); + _array.serializedObject.ApplyModifiedProperties(); + } + + UpdateList(); + } + + public void SetFoldingState(bool open) + { + _listContainer.value = open; + if (_array != null) _array.isExpanded = open; + else _hasFoldingBeenForced = true; + } + + public new class UxmlFactory : UxmlFactory { } + + public new class UxmlTraits : BindableElement.UxmlTraits + { + UxmlBoolAttributeDescription showElements = + new UxmlBoolAttributeDescription { name = "show-elements-text", defaultValue = true }; + + public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) + { + base.Init(ve, bag, cc); + + if (ve is ModuleInspectorList ate) ate._showElementsButtons = showElements.GetValueFromBag(bag, cc); + } + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs.meta new file mode 100644 index 00000000..aab66df8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/ModuleInspectorList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f9210556d98393149bad9819fb127c5b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs new file mode 100644 index 00000000..73079bd3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs @@ -0,0 +1,30 @@ +using UnityEngine.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + public class VariableField : VisualElement + { + public Variable Variable { get; set; } + + private string _type; + + public VariableField(Variable variable) + { + Variable = variable; + if(variable.Type == VariableType.Custom) + _type = variable.CustomType; + else + _type = variable.Type.ToString(); + var nameField = new Label(variable.Name); + var typeField = new Label(_type); + + nameField.style.flexGrow = 1; + typeField.AddToClassList("variable-type-text"); + Add(nameField); + Add(typeField); + + style.flexDirection = FlexDirection.Row; + + } + } +} \ No newline at end of file diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs.meta new file mode 100644 index 00000000..476b82a9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Elements/VariableField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1d7f89d7e489068458d4c125179d6061 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors.meta b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors.meta new file mode 100644 index 00000000..6a6b0b87 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5f27652ec52b1e4abcf40a28dfa2e9c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ModularShaderEditor.cs b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ModularShaderEditor.cs new file mode 100644 index 00000000..4da90e07 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Scripts/Editor/ModularShaderSystem/Editors/Inspectors/ModularShaderEditor.cs @@ -0,0 +1,68 @@ +using System; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using UnityEditor.UIElements; + +namespace Poiyomi.ModularShaderSystem.UI +{ + [CustomEditor(typeof(ModularShader))] + public class ModularShaderEditor : Editor + { + private VisualElement _root; + private ModularShader _shader; + + public override VisualElement CreateInspectorGUI() + { + _root = new VisualElement(); + _shader = (ModularShader)serializedObject.targetObject; + var visualTree = Resources.Load(MSSConstants.RESOURCES_FOLDER + "/MSSUIElements/ModularShaderEditor"); + VisualElement template = visualTree.CloneTree(); + + _root.Add(template); + + var baseModulesField = _root.Q("BaseModulesField"); + bool areModulesEditable = !_shader.LockBaseModules; + bool checkForProperties = _shader.UseTemplatesForProperties; + if(!areModulesEditable) + baseModulesField.SetFoldingState(true); + baseModulesField.SetEnabled(areModulesEditable); + + var templateField = _root.Q("ShaderTemplateField"); + templateField.objectType = typeof(TemplateAsset); + + var propertiesTemplateField = _root.Q("ShaderPropertiesTemplateField"); + propertiesTemplateField.objectType = typeof(TemplateAsset); + propertiesTemplateField.style.display = checkForProperties ? DisplayStyle.Flex : DisplayStyle.None; + + var useTemplatesField = _root.Q("UseTemplatesForPropertiesField"); + useTemplatesField.RegisterValueChangedCallback(x => + { + propertiesTemplateField.style.display = x.newValue ? DisplayStyle.Flex : DisplayStyle.None; + }); + + var generateButton = _root.Q